We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 19f3ee9 commit b371321Copy full SHA for b371321
src/util.cpp
@@ -65,6 +65,7 @@
65
#ifndef NOMINMAX
66
#define NOMINMAX
67
#endif
68
+#include <codecvt>
69
70
#include <io.h> /* for _commit */
71
#include <shlobj.h>
@@ -747,7 +748,12 @@ double double_safe_multiplication(double fValue, double fmultiplicator)
747
748
749
void runCommand(std::string strCommand)
750
{
751
+ if (strCommand.empty()) return;
752
+#ifndef WIN32
753
int nErr = ::system(strCommand.c_str());
754
+#else
755
+ int nErr = ::_wsystem(std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>,wchar_t>().from_bytes(strCommand).c_str());
756
+#endif
757
if (nErr)
758
LogPrintf("runCommand error: system(%s) returned %d\n", strCommand, nErr);
759
}
0 commit comments