Open
Description
Found while checking: #35429
Currently it is not possible to have a path represent the file URL new URL('file:///a//b')
when going through url.pathToFileURL
. url.fileURLToPath
does property preserve the //
in the path already. This causes round trips to be lossy.
- Version: 14
- Platform: OSX
- Subsystem: url
What steps will reproduce the bug?
console.log(url.pathToFileURL('/a//b').href);
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior?
file:///a//b
What do you see instead?
file:///a/b