2
0
Эх сурвалжийг харах

Merge pull request #16 from Meloong-Git/codex/fix-path-comparison-culture

fix: 让路径比较不受当前语言设置影响
龙腾猫跃 1 долоо хоног өмнө
parent
commit
c774ae4c85

+ 1 - 1
Shared/Utils/PathUtils.cs

@@ -243,7 +243,7 @@ public static class PathUtils {
     public static int Compare(string? path1, string? path2) {
     public static int Compare(string? path1, string? path2) {
         if (string.IsNullOrEmpty(path1)) return string.IsNullOrEmpty(path2) ? 0 : -1;
         if (string.IsNullOrEmpty(path1)) return string.IsNullOrEmpty(path2) ? 0 : -1;
         if (string.IsNullOrEmpty(path2)) return 1;
         if (string.IsNullOrEmpty(path2)) return 1;
-        return string.Compare(PathUtils.ForCompare(path1!), PathUtils.ForCompare(path2!), true);
+        return string.Compare(PathUtils.ForCompare(path1!), PathUtils.ForCompare(path2!), StringComparison.OrdinalIgnoreCase);
     }
     }
 
 
     /// <summary>
     /// <summary>