summaryrefslogtreecommitdiff
path: root/std/path/posix.ts
diff options
context:
space:
mode:
Diffstat (limited to 'std/path/posix.ts')
-rw-r--r--std/path/posix.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/std/path/posix.ts b/std/path/posix.ts
index 3c4262203..fca7f081b 100644
--- a/std/path/posix.ts
+++ b/std/path/posix.ts
@@ -435,6 +435,6 @@ 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/");
+ return decodeURIComponent((url instanceof URL ? url : new URL(url)).pathname
+ .replace(/^\/*([A-Za-z]:)(\/|$)/, "$1/"));
}