-
Notifications
You must be signed in to change notification settings - Fork 591
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
Path with spaces gets broken up at space #439
Comments
I suspect that because you have used |
Thanks @jarro2783. Any chance to get a fix in for this? |
We set the cxxopts type to std::string, and then read it into a filesystem::path. Due to jarro2783/cxxopts#439 we don't use filesystem::path with cxxopts directly. Like this, we can read paths with spaces using "\...path with space\" in launch.vs.json, and paths without spaces without the extra quotes.
Not yet, I'll try and get some time this week. |
@patrikhuber I had a go at supporting this, can you give that branch a try for your use case? PR #447 |
Hi,
I've got a simple app with an
--input
argument that contains a path with a space. I'm using VS andlaunch.vs.json
to launch this, so theargs
part oflaunch.vs.json
looks like:And I'm reading this into cxxopts with
input_path = result["input"].as<std::filesystem::path>();
.The problem is that
input_path
only containsC:\\My
.I've tried it with and without the escaped quotes in launch.vs.json (i.e. with and without the extra
\"
but it didn't make any change.I can also confirm that
argv[2]
does confirm the whole path, i.e. argv[2] is a char* containing"C:\\My - Long path"
.Seems cxxopts is parsing / breaking this up wrongly?
The text was updated successfully, but these errors were encountered: