Repository navigation
Fix set_directory on Windows for \\?\UNC\ paths and / separators - #372
Open
Jetttyy777 wants to merge 1 commit into
Open
Jetttyy777 wants to merge 1 commit into
Jetttyy777 wants to merge 1 commit into
Conversation
The shell can't parse paths with the `\?\` prefix or `/` separators, and `SHCreateItemFromParsingName` fails on them, so the dialog silently ignored the directory. Stripping only `\?\` turned the `\?\UNC\...` paths that `std::fs::canonicalize` returns for network shares into an invalid `UNC\...` path. Turn `\?\UNC\server\share` into `\server\share`, strip `\?\` from other paths, and replace `/` with `\`. Fixes PolyMeilex#307.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #307
on windows,
set_directorywas getting silently ignored in two cases:canonicalizereturns\\?\UNC\server\share, and stripping the\\?\leavesUNC\server\share, which isn't a valid path/in it, since the dialog doesn't accept thosea small helper now turns
\\?\UNC\server\shareinto\\server\share, strips\\?\from normal paths, and swaps/for\added 4 tests and a changelog entry. heads up, i only tested this with the unit tests, not against a real network share