We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 427253c commit 23db954Copy full SHA for 23db954
src/util.cpp
@@ -58,6 +58,7 @@
58
#ifndef NOMINMAX
59
#define NOMINMAX
60
#endif
61
+#include <codecvt>
62
63
#include <io.h> /* for _commit */
64
#include <shlobj.h>
@@ -1135,7 +1136,11 @@ fs::path GetSpecialFolderPath(int nFolder, bool fCreate)
1135
1136
void runCommand(const std::string& strCommand)
1137
{
1138
if (strCommand.empty()) return;
1139
+#ifndef WIN32
1140
int nErr = ::system(strCommand.c_str());
1141
+#else
1142
+ int nErr = ::_wsystem(std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>,wchar_t>().from_bytes(strCommand).c_str());
1143
+#endif
1144
if (nErr)
1145
LogPrintf("runCommand error: system(%s) returned %d\n", strCommand, nErr);
1146
}
0 commit comments