mirror of
https://github.com/sharkdp/fd.git
synced 2026-09-01 15:12:46 +08:00
Fix Windows hyperlinks for paths with spaces
Fixes #1843 Changed the host() function for Windows to return '/' instead of '' to generate RFC 3986 compliant file URLs with three slashes. Before: file://C:/test/hi%20there.txt (broken) After: file:///C:/test/hi%20there.txt (works) This fixes hyperlinks failing on Windows when file paths contain spaces or other characters that require percent-encoding.
This commit is contained in:
+1
-1
@@ -58,7 +58,7 @@ fn host() -> &'static str {
|
||||
|
||||
#[cfg(not(unix))]
|
||||
const fn host() -> &'static str {
|
||||
""
|
||||
"/"
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
Reference in New Issue
Block a user