Browse Source

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

fix: 让路径比较不受当前语言设置影响
龙腾猫跃 1 tuần trước cách đây
mục cha
commit
c774ae4c85
1 tập tin đã thay đổi với 1 bổ sung và 1 xóa
  1. 1 1
      Shared/Utils/PathUtils.cs

+ 1 - 1
Shared/Utils/PathUtils.cs

@@ -243,7 +243,7 @@ public static class PathUtils {
     public static int Compare(string? path1, string? path2) {
         if (string.IsNullOrEmpty(path1)) return string.IsNullOrEmpty(path2) ? 0 : -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>