Code Review

This commit is contained in:
龙腾猫跃 committed 2026-05-07 08:46:48 +08:00
1 parent be6336f548
commit 9158a69b62
11 files changed
+103 -65

No files matched your search

+5 -2
View File
@@ -74,8 +74,11 @@ public static class PathUtils {
/// <summary>
/// 去除路径开头的 <c>\\?\</c>。
/// </summary>
public static string WithoutLongPath(string path)
=> path.AfterLast(@"\\?\");
public static string WithoutLongPath(string path) {
if (path.StartsWithF(@"\\?\UNC\")) return @"\\" + path.AfterLast(@"\\?\UNC\");
if (path.StartsWithF(@"\\?\")) return path.AfterLast(@"\\?\");
return path;
}
#endregion