From 7402647008a7434958c2d835d455de00ba80e9a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BE=99=E8=85=BE=E7=8C=AB=E8=B7=83?= <1043137532@qq.com> Date: Tue, 12 May 2026 11:54:42 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=95=BF=E8=B7=AF=E5=BE=84=E5=A4=84?= =?UTF-8?q?=E7=90=86=E6=9C=89=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Shared/Utils/PathUtils.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Shared/Utils/PathUtils.cs b/Shared/Utils/PathUtils.cs index c47adfd..e851934 100644 --- a/Shared/Utils/PathUtils.cs +++ b/Shared/Utils/PathUtils.cs @@ -49,10 +49,10 @@ public static class PathUtils { // 缩短路径 char[] buffer = new char[260]; - int result = GetShortPathNameW(pathToShorten, buffer, buffer.Length); + int result = GetShortPathNameW(PathUtils.WithLongPath(pathToShorten), buffer, buffer.Length); if (result == 0) return fullName; string shortPath = new(buffer, 0, result); - return Path.Combine(shortPath, pathToKeep); + return PathUtils.WithoutLongPath(Path.Combine(shortPath, pathToKeep)); } [DllImport("kernel32.dll", CharSet = CharSet.Unicode)] private static extern int GetShortPathNameW(string lpszLongPath, [Out] char[] buffer, int cchBuffer);