فهرست منبع

[cs] fixed passing relative path to exe to sys.io.Process, when using mono on Windows

Andy Li 9 سال پیش
والد
کامیت
8507b76677
1فایلهای تغییر یافته به همراه3 افزوده شده و 0 حذف شده
  1. 3 0
      std/cs/_std/sys/io/Process.hx

+ 3 - 0
std/cs/_std/sys/io/Process.hx

@@ -39,6 +39,9 @@ class Process {
 	public function new( cmd : String, args : Array<String> ) : Void
 	{
 		this.native = new NativeProcess();
+		// mono 4.2.1 on Windows doesn't support relative path correctly
+		if (cmd.indexOf("/") != -1 || cmd.indexOf("\\") != -1)
+			cmd = sys.FileSystem.fullPath(cmd);
 		native.StartInfo.FileName = cmd;
 		native.StartInfo.CreateNoWindow = true;
 		native.StartInfo.Arguments = [