Browse Source

Quote executable name in case there are spaces.

Branimir Karadžić 8 years ago
parent
commit
d3a0ac4c34
1 changed files with 6 additions and 6 deletions
  1. 6 6
      src/process.cpp

+ 6 - 6
src/process.cpp

@@ -46,9 +46,9 @@ namespace bx
 			return false;
 			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);
 		strCat(tmp, BX_COUNTOF(tmp), _args);
 
 
 		m_file = popen(tmp, "r");
 		m_file = popen(tmp, "r");
@@ -117,9 +117,9 @@ namespace bx
 			return false;
 			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);
 		strCat(tmp, BX_COUNTOF(tmp), _args);
 
 
 		m_file = popen(tmp, "w");
 		m_file = popen(tmp, "w");