Merge pull request #16 from Meloong-Git/codex/fix-path-comparison-culture
fix: 让路径比较不受当前语言设置影响
This commit is contained in:
1 file changed
+1
-1
@@ -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>
|
||||
|
||||
Reference in new issue
Block a user