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 for long paths (was: System.IO.DirectoryNotFoundException: Could not find a part of the path.) #68

Open
seanlillis opened this issue Mar 25, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@seanlillis
Copy link

seanlillis commented Mar 25, 2022

System.IO.DirectoryNotFoundException: Could not find a part of the path.

The file is present. Full path length is 263 characters. Reducing the file path to 207 characters works around the issue, however this is not possible in all cases.

@markstan
Copy link
Member

markstan commented May 23, 2022

You can work around this by prepending \\?\ to the path:

The maximum path of 32,767 characters is approximate, because the "\\?\" prefix may be expanded to a longer string by the system at run time, and this expansion applies to the total length.

image

@ameltzer-MSFT ameltzer-MSFT added the enhancement New feature or request label Jun 10, 2024
@ameltzer-MSFT ameltzer-MSFT changed the title System.IO.DirectoryNotFoundException: Could not find a part of the path. Support for long paths (was: System.IO.DirectoryNotFoundException: Could not find a part of the path.) Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants