diff options
Diffstat (limited to 'std/path/win32.ts')
-rw-r--r-- | std/path/win32.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/std/path/win32.ts b/std/path/win32.ts index eed1cbdb8..19b29a6b9 100644 --- a/std/path/win32.ts +++ b/std/path/win32.ts @@ -919,7 +919,8 @@ export function fromFileUrl(url: string | URL): string { let path = decodeURIComponent( url.pathname .replace(/^\/*([A-Za-z]:)(\/|$)/, "$1/") - .replace(/\//g, "\\"), + .replace(/\//g, "\\") + .replace(/%(?![0-9A-Fa-f]{2})/g, "%25"), ); if (url.hostname != "") { // Note: The `URL` implementation guarantees that the drive letter and |