You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've got a simple app with an --input argument that contains a path with a space. I'm using VS and launch.vs.json to launch this, so the args part of launch.vs.json looks like:
"args": [
"--input",
"\"C:\\My - Long path\""
]
And I'm reading this into cxxopts with input_path = result["input"].as<std::filesystem::path>();.
The problem is that input_path only contains C:\\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:
I suspect that because you have used std::filesystem::path it is getting put through the stringstream parser which is splitting it at the first space. If you make it a string then it should work. It should probably just work though, I'll see if I can work out a proper fix.
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: