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);
|
||||
}
|
||||
|
||||
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
|
||||
{
|
||||
FileName = "v2rayUpgrade.exe",
|
||||
Arguments = $"\"{fileName}\"",
|
||||
Arguments = fileName.AppendQuotes(),
|
||||
WorkingDirectory = Utils.StartupPath()
|
||||
}
|
||||
};
|
||||
|
@ -364,7 +364,7 @@ namespace v2rayN.Handler
|
|||
}
|
||||
|
||||
using Process p = new();
|
||||
p.StartInfo.FileName = filePath;
|
||||
p.StartInfo.FileName = filePath.AppendQuotes();
|
||||
p.StartInfo.Arguments = coreInfo.versionArg;
|
||||
p.StartInfo.WorkingDirectory = Utils.StartupPath();
|
||||
p.StartInfo.UseShellExecute = false;
|
||||
|
|
|
@ -1388,7 +1388,7 @@ namespace v2rayN.ViewModels
|
|||
UseShellExecute = true,
|
||||
Arguments = Global.RebootAs,
|
||||
WorkingDirectory = Utils.StartupPath(),
|
||||
FileName = Utils.GetExePath(),
|
||||
FileName = Utils.GetExePath().AppendQuotes(),
|
||||
Verb = "runas",
|
||||
};
|
||||
try
|
||||
|
|
Loading…
Reference in New Issue