Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support \\?\ prefix in UNC Windows paths #106

Open
Awjin opened this issue Mar 19, 2021 · 2 comments
Open

Support \\?\ prefix in UNC Windows paths #106

Awjin opened this issue Mar 19, 2021 · 2 comments
Labels
contributions-welcome Contributions welcome to help resolve this (the resolution is expected to be clear from the issue) type-enhancement A request for a change that isn't a bug

Comments

@Awjin
Copy link

Awjin commented Mar 19, 2021

See https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file?redirectedfrom=MSDN#win32-file-namespaces:

For file I/O, the "\\?\" prefix to a path string tells the Windows APIs to disable all string parsing and to send the string that follows it straight to the file system.

Currently, path supports UNC paths, but does not support this prefix.

This prohibits Dart Sass from properly parsing such paths with toUri: sass/dart-sass#1258

@natebosch
Copy link
Member

Can you give an example call and what you'd like to see the path package do differently with it?

@nex3
Copy link
Member

nex3 commented Apr 6, 2021

Generally, the \\?\ prefix should be stripped and the remainder of the path should be parsed as a standard Windows path. For example, \\?\C:\foo\bar should be treated as equivalent to C:\foo\bar. The main difference is that if the path contains a . or .. component, that should not be resolved as a traversal reference.

@natebosch natebosch added type-enhancement A request for a change that isn't a bug contributions-welcome Contributions welcome to help resolve this (the resolution is expected to be clear from the issue) and removed status-needs-info labels Jun 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributions-welcome Contributions welcome to help resolve this (the resolution is expected to be clear from the issue) type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

3 participants