Skip to content

Commit

Permalink
fix: properly check if an install is an update
Browse files Browse the repository at this point in the history
  • Loading branch information
anna-is-cute committed Sep 13, 2024
1 parent cb5687c commit b7a9536
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion DownloadTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ private async Task<IDownloadTask_GetVersion> GetPackageInfo() {
var downloadKind = DownloadKind.Install;
var installed = await this.Plugin.State.GetInstalled(this.CancellationToken.Token);
if (installed.TryGetValue(this.PackageId, out var pkg)) {
if (pkg.Variants.Any(variant => variant.Id == this.VariantId)) {
if (pkg.Variants.Any(meta => meta.VariantId == this.VariantId)) {
downloadKind = DownloadKind.Update;
}
}
Expand Down Expand Up @@ -331,6 +331,7 @@ private async Task TestHardLinks() {

b = Path.Join(this.PenumbraModPath, Path.GetRandomFileName());
FileHelper.CreateHardLink(a, b);

this.SupportsHardLinks = true;
} catch (InvalidOperationException) {
this.SupportsHardLinks = false;
Expand Down

0 comments on commit b7a9536

Please sign in to comment.