We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f34e4f2 + 9e86cd0 commit 9799317Copy full SHA for 9799317
src/util/run.cpp
@@ -165,7 +165,8 @@ static fdt stdio_redirection(int fd, const std::string &file)
165
// https://blogs.msdn.microsoft.com/twistylittlepassagesallalike/2011/04/23/everyone-quotes-command-line-arguments-the-wrong-way/
166
std::wstring quote_windows_arg(const std::wstring &src)
167
{
168
- if(src.find_first_of(L" \t\n\v\"") == src.npos)
+ // note that an empty argument requires quotes
169
+ if(src.find_first_of(L" \t\n\v\"") == src.npos && !src.empty())
170
return src;
171
172
std::wstring result = L"\"";
0 commit comments