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

This commit is contained in:
Grant Limberg 2017-01-03 14:03:50 -08:00
parent 9a2b766aad
commit aaf69d1aff

View File

@ -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";