ref: 精简路径比较修复

This commit is contained in:
Meloong Bot committed 2026-10-11 03:04:16 +08:00
1 parent 201948eac8
commit ae6676cd90
4 files changed
+1 -81

No files matched your search

+1 -1
View File
@@ -265,7 +265,7 @@ public static class PathUtils {
public static bool IsParentOf(string parentPath, string childPath) {
parentPath = PathUtils.ForCompare(parentPath);
childPath = PathUtils.ForCompare(childPath);
return childPath.StartsWith(parentPath + @"\", StringComparison.OrdinalIgnoreCase) || PathUtils.IsSame(childPath, parentPath);
return childPath.StartsWithF(parentPath + @"\", true) || PathUtils.IsSame(childPath, parentPath);
}
}