pathToFileURL
function in url fails to handle \\?\UNC\
Prefix properly
#54261
Labels
confirmed-bug
Issues with confirmed bugs.
url
Issues and PRs related to the legacy built-in url module.
windows
Issues and PRs related to the Windows platform.
Version
22.5.1
Platform
Subsystem
No response
What steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
Anytime
What is the expected behavior? Why is that the expected behavior?
According to the Microsoft documentation on maximum file path limitations, the \?\UNC\ prefix are not used as part of the path itself. so it should be ignored when converting to a file URI. The current implementation does not adhere to this guideline, resulting in incorrect URL conversions. Its output should be
file://server/share/folder/file.txt.
What do you see instead?
file:///UNC/server/share/folder/file.txt
Additional information
No response
The text was updated successfully, but these errors were encountered: