diff options
Diffstat (limited to 'std/path/win32.ts')
-rw-r--r-- | std/path/win32.ts | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/std/path/win32.ts b/std/path/win32.ts index cf0e69537..0283f4b9c 100644 --- a/std/path/win32.ts +++ b/std/path/win32.ts @@ -914,7 +914,9 @@ export function parse(path: string): ParsedPath { * are ignored. */ export function fromFileUrl(url: string | URL): string { - return (url instanceof URL ? url : new URL(url)).pathname - .replace(/^\/*([A-Za-z]:)(\/|$)/, "$1/") - .replace(/\//g, "\\"); + return decodeURIComponent( + (url instanceof URL ? url : new URL(url)).pathname + .replace(/^\/*([A-Za-z]:)(\/|$)/, "$1/") + .replace(/\//g, "\\"), + ); } |