Fix bfscfg argument quoting for paths with spaces - #25
Merged
shschaefer merged 1 commit intoMar 5, 2026
Merged
Conversation
Paths containing spaces (e.g. 'Session Storage') were passed unquoted to bfscfg.exe, causing the path to be split into multiple arguments. bfscfg would then treat the second word as an unknown option and fail with exit code 87. Quote any argument containing spaces when building the command line. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes failures when invoking bfscfg.exe with filesystem paths containing spaces by quoting affected arguments in FileSystemBfsManager::RunBfsCfg(), preventing the path from being split into multiple command-line tokens.
Changes:
- Quote
bfscfg.exearguments that contain spaces when building theCreateProcessWcommand line. - Improve inline documentation describing the command-line construction behavior.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
shschaefer
approved these changes
Mar 5, 2026
8 tasks
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.
Summary
Fixes #24 — filesystem paths containing spaces are not quoted when passed to
bfscfg.exe, causing the path to be split into multiple arguments and the policy to silently fail.What changed
wxc_common/FileSystemBfsManager.cpp—RunBfsCfg()Arguments containing spaces are now wrapped in double quotes before being appended to the command line string.
Before:
bfscfg.exe --addpolicy --policybroker --filename C:\...\Session Storage --appid ClippyAfter:
bfscfg.exe --addpolicy --policybroker --filename "C:\...\Session Storage" --appid ClippyTesting
With a policy containing a path with spaces (e.g.
Session Storage):bfscfg.exe exited with code 87/Unknown option: Storagebfscfg process created successfully— policy applied correctly