Add browser download confirmation and parameterized client startup
This commit is contained in:
1 parent
028fec64be
commit
3cf197a98c
25 files changed
+568
-46
No files matched your search
@@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
#include <string>
|
||||
namespace browser_bridge {
|
||||
// Quote one argv value for CommandLineToArgvW/CreateProcessW; no shell is involved.
|
||||
inline std::wstring QuoteArgument(const std::wstring& value) {
|
||||
std::wstring result=L"\""; size_t slashes=0;
|
||||
for (wchar_t c:value) {
|
||||
if (c==L'\\') { ++slashes; continue; }
|
||||
result.append(c==L'"'?slashes*2+1:slashes,L'\\'); slashes=0; result+=c;
|
||||
}
|
||||
result.append(slashes*2,L'\\'); return result+L'"';
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user