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

fix: 让路径比较不受当前语言设置影响
This commit is contained in:
龙腾猫跃 authored and GitHub committed 2026-10-11 03:06:49 +08:00
commit c774ae4c85
1 file changed
+1 -1
+1 -1
View File
@@ -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>