mirror of
https://github.com/QL-Win/QuickLook.git
synced 2026-01-14 07:06:15 +08:00
Quote and prefix long paths when copying to clipboard
Paths copied to the clipboard are now quoted, and long paths (>= 260 characters) are prefixed with \\?\ to ensure compatibility. This improves reliability when handling long file paths.
This commit is contained in:
@@ -48,7 +48,7 @@ internal static class Helper
|
||||
uri.Append('/');
|
||||
else
|
||||
uri.Append($"%{(int)v:X2}");
|
||||
if (uri.Length >= 2 && uri[0] == '/' && uri[1] == '/') // UNC path
|
||||
if (uri.Length >= 2 && uri[0] == '/' && uri[1] == '/') // UNC path - Universal Naming Convention
|
||||
uri.Insert(0, "file:");
|
||||
else
|
||||
uri.Insert(0, "file:///");
|
||||
|
||||
Reference in New Issue
Block a user