-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix profile matching for paths containing unquoted whitespace (#12348)
The previous code had two bugs for: * paths with more than 1 whitespace The code joins the argv array by replacing null-word terminators with whitespace. Unfortunately it always referred to the separator between `argv[0]` and `argv[1]` for this instead of continuing to join those between 1 and 2, etc. * paths sharing a common prefix with another directory `SearchPathW` returns paths that aren't necessarily paths to files. A call to `GetFileAttributesW` was added, ensuring we only resolve file paths. ## PR Checklist * [x] Closes #12345 * [x] I work here * [ ] Tests added/passed ## Validation Steps Performed * Paths with more than 1 whitespace resolve correctly ✅ * Paths with neighboring directories sharing a common prefix resolve correctly ✅ * Tests added ✅
- Loading branch information
Showing
4 changed files
with
99 additions
and
34 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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