Quote executable name in case there are spaces.

This commit is contained in:
Branimir Karadžić
2017-07-20 20:26:27 -07:00
parent 71be6d691d
commit d3a0ac4c34

View File

@@ -46,9 +46,9 @@ namespace bx
return false;
}
char tmp[kMaxFilePath*2];
strCopy(tmp, BX_COUNTOF(tmp), _filePath.get() );
strCat(tmp, BX_COUNTOF(tmp), " ");
char tmp[kMaxFilePath*2] = "\"";
strCat(tmp, BX_COUNTOF(tmp), _filePath.get() );
strCat(tmp, BX_COUNTOF(tmp), "\" ");
strCat(tmp, BX_COUNTOF(tmp), _args);
m_file = popen(tmp, "r");
@@ -117,9 +117,9 @@ namespace bx
return false;
}
char tmp[kMaxFilePath*2];
strCopy(tmp, BX_COUNTOF(tmp), _filePath.get() );
strCat(tmp, BX_COUNTOF(tmp), " ");
char tmp[kMaxFilePath*2] = "\"";
strCat(tmp, BX_COUNTOF(tmp), _filePath.get() );
strCat(tmp, BX_COUNTOF(tmp), "\" ");
strCat(tmp, BX_COUNTOF(tmp), _args);
m_file = popen(tmp, "w");