Jelajahi Sumber

properly quote string arguments to copyutil in case there are spaces in the path

Grant Limberg 8 tahun lalu
induk
melakukan
aaf69d1aff
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      windows/WinUI/APIHandler.cs

+ 1 - 1
windows/WinUI/APIHandler.cs

@@ -61,7 +61,7 @@ namespace WinUI
                 String curPath = System.Reflection.Assembly.GetEntryAssembly().Location;
                 int index = curPath.LastIndexOf("\\");
                 curPath = curPath.Substring(0, index);
-                ProcessStartInfo startInfo = new ProcessStartInfo(curPath + "\\copyutil.exe", globalZtDir + " " + localZtDir);
+                ProcessStartInfo startInfo = new ProcessStartInfo(curPath + "\\copyutil.exe", "\""+globalZtDir+"\"" + " " + "\""+localZtDir+"\"");
                 startInfo.Verb = "runas";