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

Windows paths starting with \\?\<Drive Letter> do not work #132

Open
MolotovCherry opened this issue Jun 9, 2023 · 3 comments
Open

Windows paths starting with \\?\<Drive Letter> do not work #132

MolotovCherry opened this issue Jun 9, 2023 · 3 comments

Comments

@MolotovCherry
Copy link

MolotovCherry commented Jun 9, 2023

If you have a path C:\foo*, it works, but if you have a path with \\?\C:\foo*, it doesn't return anything. The \\?\ is a valid path and works in other parts of the Rust std library.

Workaround for now:
Strip \\?\ from the beginning of the path

@wmmc88
Copy link

wmmc88 commented Aug 1, 2023

I just ran into this error as well. This happens when a windows path in canonicalized via the standard library, resulting in a path that glob fails to function on

@pavi2410
Copy link

Noticed this same issue on Windows

As a workaround, removing the prefix \\?\ works

@ChrisDenton
Copy link
Member

Note that removing the \\?\ prefix is not always the right thing to do. E.g. \\?\UNC\ should be converted to \\. Also there are some rarer paths which don't have a win32 equivalent (e.g. a path that ends with a dot or device that isn't currently mounted to a drive or directory).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants