浏览代码

make Sys.command quote executing command on Windows (see #3402)

Dan Korostelev 11 年之前
父节点
当前提交
e6c2dd0ce5
共有 3 个文件被更改,包括 3 次插入0 次删除
  1. 1 0
      std/cpp/_std/Sys.hx
  2. 1 0
      std/neko/_std/Sys.hx
  3. 1 0
      std/php/_std/Sys.hx

+ 1 - 0
std/cpp/_std/Sys.hx

@@ -101,6 +101,7 @@
 			for( a in args )
 				cmd += " "+escapeArgument(a);
 		}
+		if (systemName() == "Windows") cmd = '"$cmd"';
 		return sys_command(cmd);
 	}
 

+ 1 - 0
std/neko/_std/Sys.hx

@@ -111,6 +111,7 @@
 			for( a in args )
 				cmd += " "+escapeArgument(a);
 		}
+		if (systemName() == "Windows") cmd = '"$cmd"';
 		return sys_command(untyped cmd.__s);
 	}
 

+ 1 - 0
std/php/_std/Sys.hx

@@ -89,6 +89,7 @@
 			for( a in args )
 				cmd += " "+escapeArgument(a);
 		}
+		if (systemName() == "Windows") cmd = '"$cmd"';
 		var result = 0;
 		untyped __call__("system", cmd, result);
 		return result;