-
-
Notifications
You must be signed in to change notification settings - Fork 33.3k
Closed
Closed
Copy link
Labels
urlIssues and PRs related to the legacy built-in url module.Issues and PRs related to the legacy built-in url module.windowsIssues and PRs related to the Windows platform.Issues and PRs related to the Windows platform.
Description
Version
18, 20, 22, 23.4.0
Platform
Microsoft Windows NT 10.0.22631.0 x64
Subsystem
No response
What steps will reproduce the bug?
PowerShell
I have a machine called strongman
.
Setup
cd \\strongman\c$\Users
node
REPL
> process.cwd() // make sure it is a UNC path
'\\\\strongman\\c$\\Users'
> url.pathToFileURL('.')
URL {
href: 'file:////strongman/c$/Users',
origin: 'null',
protocol: 'file:',
username: '',
password: '',
host: '',
hostname: '',
port: '',
pathname: '//strongman/c$/Users',
search: '',
searchParams: URLSearchParams {},
hash: ''
}
How often does it reproduce? Is there a required condition?
100% of the time.
What is the expected behavior? Why is that the expected behavior?
url.pathToFileURL('.')
should create the correct URL: file://hostname/c$/Users
.
What do you see instead?
url.pathToFileURL('.')
creates a URL of the form: file:////hostname/c$/Users
.
Additional information
Metadata
Metadata
Assignees
Labels
urlIssues and PRs related to the legacy built-in url module.Issues and PRs related to the legacy built-in url module.windowsIssues and PRs related to the Windows platform.Issues and PRs related to the Windows platform.