ref: 精简路径比较修复
This commit is contained in:
1 parent
201948eac8
commit
ae6676cd90
4 files changed
+1
-81
No files matched your search
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user