mirror of https://github.com/2dust/v2rayN
bug fix
parent
6f22b74154
commit
bd838094cd
|
@ -80,5 +80,15 @@ namespace v2rayN
|
||||||
|
|
||||||
return char.ToUpper(value[0]) + value.Substring(1);
|
return char.ToUpper(value[0]) + value.Substring(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static string AppendQuotes(this string value)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(value))
|
||||||
|
{
|
||||||
|
return string.Empty;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $"\"{value}\"";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -54,7 +54,7 @@ namespace v2rayN.Handler
|
||||||
StartInfo = new ProcessStartInfo
|
StartInfo = new ProcessStartInfo
|
||||||
{
|
{
|
||||||
FileName = "v2rayUpgrade.exe",
|
FileName = "v2rayUpgrade.exe",
|
||||||
Arguments = $"\"{fileName}\"",
|
Arguments = fileName.AppendQuotes(),
|
||||||
WorkingDirectory = Utils.StartupPath()
|
WorkingDirectory = Utils.StartupPath()
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -364,7 +364,7 @@ namespace v2rayN.Handler
|
||||||
}
|
}
|
||||||
|
|
||||||
using Process p = new();
|
using Process p = new();
|
||||||
p.StartInfo.FileName = filePath;
|
p.StartInfo.FileName = filePath.AppendQuotes();
|
||||||
p.StartInfo.Arguments = coreInfo.versionArg;
|
p.StartInfo.Arguments = coreInfo.versionArg;
|
||||||
p.StartInfo.WorkingDirectory = Utils.StartupPath();
|
p.StartInfo.WorkingDirectory = Utils.StartupPath();
|
||||||
p.StartInfo.UseShellExecute = false;
|
p.StartInfo.UseShellExecute = false;
|
||||||
|
|
|
@ -1388,7 +1388,7 @@ namespace v2rayN.ViewModels
|
||||||
UseShellExecute = true,
|
UseShellExecute = true,
|
||||||
Arguments = Global.RebootAs,
|
Arguments = Global.RebootAs,
|
||||||
WorkingDirectory = Utils.StartupPath(),
|
WorkingDirectory = Utils.StartupPath(),
|
||||||
FileName = Utils.GetExePath(),
|
FileName = Utils.GetExePath().AppendQuotes(),
|
||||||
Verb = "runas",
|
Verb = "runas",
|
||||||
};
|
};
|
||||||
try
|
try
|
||||||
|
|
Loading…
Reference in New Issue