-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Fix UNC paths #110033
base: main
Are you sure you want to change the base?
Fix UNC paths #110033
Conversation
Tagging subscribers to this area: @vitek-karas, @agocke, @VSadov |
If the input file was a network path then the raw path returned by GetFinalPathByHandle may return a UNC path. If so, and if the original path wasn't a UNC path, and the original path doesn't need normalization, we want to use the original path.
dd27740
to
1042720
Compare
Co-authored-by: Elinor Fung <elfung@microsoft.com>
Finished testing this around MAX_PATH. It has the expected behavior, as far as I can see. In particular, if you have a path that is very close to MAX_PATH, and the resultant UNC extended path exceeds MAX_PATH, the result will be a UNC path. I think that's fine, and it makes the code simpler to not deal with chopping off the extra UNC extended bytes. |
Co-authored-by: Elinor Fung <elfung@microsoft.com>
If the input file was a network path then the raw path returned by GetFinalPathByHandle may return a UNC path. If so, and if the original path wasn't a UNC path, we want to remove the UNC prefix unless it was necessary to fully resolve the path.