Skip to content

Commit 26c58c1

Browse files
committed
Fix comparsion
1 parent 1f5d73a commit 26c58c1

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

src/UniGetUI.Core.Tools/Tools.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ public static async Task<long> GetFileSizeAsyncAsLong(Uri? url)
316316
}
317317

318318

319-
public struct Version: IComparable<Version>, IEquatable<Version>
319+
public struct Version: IComparable
320320
{
321321
public static readonly Version Null = new(-1, -1, -1, -1);
322322

@@ -333,8 +333,10 @@ public Version(int major, int minor = 0, int patch = 0, int remainder = 0)
333333
Remainder = remainder;
334334
}
335335

336-
public int CompareTo(Version other)
336+
public int CompareTo(object? other_)
337337
{
338+
if (other_ is not Version other) return 0;
339+
338340
int major = Major.CompareTo(other.Major);
339341
if (major != 0) return major;
340342

src/UniGetUI.PackageEngine.Managers.Chocolatey/Chocolatey.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ namespace UniGetUI.PackageEngine.Managers.ChocolateyManager
1919
public class Chocolatey : BaseNuGet
2020
{
2121
public static new string[] FALSE_PACKAGE_IDS = ["Directory", "", "Did", "Features?", "Validation", "-", "being", "It", "Error", "L'accs", "Maximum", "This", "Output is package name ", "operable", "Invalid"];
22-
public static new string[] FALSE_PACKAGE_VERSIONS = ["", "Did", "Features?", "Validation", "-", "being", "It", "Error", "L'accs", "Maximum", "This", "packages", "current version", "installed version", "is", "program", "validations", "argument", "no"];
22+
public static new string[] FALSE_PACKAGE_VERSIONS = ["", "of", "Did", "Features?", "Validation", "-", "being", "It", "Error", "L'accs", "Maximum", "This", "packages", "current version", "installed version", "is", "program", "validations", "argument", "no"];
2323

2424
public Chocolatey()
2525
{

0 commit comments

Comments
 (0)