-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
Open
Labels
pathIssues and PRs related to the path subsystem.Issues and PRs related to the path subsystem.windowsIssues and PRs related to the Windows platform.Issues and PRs related to the Windows platform.
Description
Version
v20.16.0
Platform
Microsoft Windows NT 10.0.22635.0 x64
Subsystem
No response
What steps will reproduce the bug?
import path from 'node:path'
console.log(path.toNamespacedPath("COM3"))How often does it reproduce? Is there a required condition?
Every time.
What is the expected behavior? Why is that the expected behavior?
This should print:
\\.\COM3
which is the fully qualified path in the device namespace
What do you see instead?
This prints the illegal path:
\\?\C:\Users\dan\COM3
Additional information
Reference for legal path name: https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file#win32-device-namespaces
Additionally console.log(url.pathToFileURL("COM3").href) prints an invalid URL, but I'm not sure if there is a corresponding valid file: URL.
Metadata
Metadata
Assignees
Labels
pathIssues and PRs related to the path subsystem.Issues and PRs related to the path subsystem.windowsIssues and PRs related to the Windows platform.Issues and PRs related to the Windows platform.