From 9d877cc32c064806cd7b234c0f0f5a5f4badfa14 Mon Sep 17 00:00:00 2001 From: LTCat <1043137532@qq.com> Date: Thu, 3 Sep 2026 21:46:50 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BC=9A=E9=94=99=E8=AF=AF=E5=9C=B0?= =?UTF-8?q?=E5=B0=9D=E8=AF=95=E5=AF=B9=E7=BD=91=E7=BB=9C=E9=93=BE=E6=8E=A5?= =?UTF-8?q?=E8=BF=9B=E8=A1=8C=E7=9F=AD=E9=93=BE=E6=8E=A5=E5=8E=8B=E7=BC=A9?= =?UTF-8?q?=EF=BC=88Meloong-Git/PCL#9314=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Shared/Utils/PathUtils.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Shared/Utils/PathUtils.cs b/Shared/Utils/PathUtils.cs index cd2ea42..b8683ee 100644 --- a/Shared/Utils/PathUtils.cs +++ b/Shared/Utils/PathUtils.cs @@ -24,9 +24,11 @@ public static class PathUtils { /// 结果的开头不含 \\?\,结尾不含分隔符。 /// public static string ToShortPath(string pathName) { + // 快速返回 if (string.IsNullOrEmpty(pathName)) return pathName; - if (!pathName.Contains(":")) return pathName; - if (pathName.Length <= 220) return pathName; // 快速返回 + if (!pathName.Contains(":") || pathName.Contains("://")) return pathName; + if (pathName.Length <= 220) return pathName; + // 开始实际处理 pathName = PathUtils.ForCompare(pathName); // 尽量保留原始文件名 string pathToKeep = "";