Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/UniGetUI.Avalonia/UniGetUI.Avalonia.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
<PackageReference Include="Octokit" Version="14.0.0" />
<PackageReference Include="Avalonia.Controls.WebView" Version="12.0.0" />
<PackageReference Include="Tmds.DBus.Protocol" Version="0.92.0" />
<PackageReference Include="Devolutions.Pinget.Cli.Rust" Version="0.6.0" GeneratePathProperty="true" ExcludeAssets="build;buildTransitive;native" />
<PackageReference Include="Devolutions.Pinget.Cli.Rust" Version="0.7.0" GeneratePathProperty="true" ExcludeAssets="build;buildTransitive;native" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,16 +109,22 @@ operation is OperationType.Uninstall

if (!usePinget)
{
if (options.CustomInstallLocation != "")
// For portable packages, always preserve the actual current install
// location read from the registry. A stale CustomInstallLocation in the
// saved InstallOptions would otherwise leave --location off and cause
// WinGet to uninstall the portable from its custom path and reinstall to
// the default portable root, silently deleting the original directory.
var detectedLocation = TryGetPortableInstallLocation(package);
if (detectedLocation is not null)
{
if (Settings.Get(Settings.K.WinGetForceLocationOnUpdate))
parameters.AddRange(["--location", $"\"{options.CustomInstallLocation}\""]);
parameters.AddRange(["--location", $"\"{detectedLocation}\""]);
}
else
else if (
options.CustomInstallLocation != ""
&& Settings.Get(Settings.K.WinGetForceLocationOnUpdate)
)
{
var detectedLocation = TryGetPortableInstallLocation(package);
if (detectedLocation is not null)
parameters.AddRange(["--location", $"\"{detectedLocation}\""]);
parameters.AddRange(["--location", $"\"{options.CustomInstallLocation}\""]);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Devolutions.Pinget.Core" Version="0.6.0" />
<PackageReference Include="Devolutions.Pinget.Core" Version="0.7.0" />
<PackageReference Include="PhotoSauce.MagicScaler" Version="0.15.0" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion src/UniGetUI/UniGetUI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@
<PackageReference Include="IdentityModel.OidcClient" Version="6.0.0" />
<PackageReference Include="Octokit" Version="14.0.0" />
<PackageReference Include="Devolutions.UniGetUI.Elevator" Version="2.6.1.3" GeneratePathProperty="true" ExcludeAssets="build;buildTransitive;native" />
<PackageReference Include="Devolutions.Pinget.Cli.Rust" Version="0.6.0" GeneratePathProperty="true" ExcludeAssets="build;buildTransitive;native" />
<PackageReference Include="Devolutions.Pinget.Cli.Rust" Version="0.7.0" GeneratePathProperty="true" ExcludeAssets="build;buildTransitive;native" />

<Manifest Include="$(ApplicationManifest)" />
</ItemGroup>
Expand Down
Loading