mirror of
https://github.com/netchx/netch.git
synced 2026-03-18 18:13:21 +08:00
fix: Updater parse multiple space path
This commit is contained in:
@@ -73,7 +73,7 @@ namespace Netch.Forms
|
||||
{
|
||||
FileName = Path.Combine(Global.NetchDir, "NetchUpdater.exe"),
|
||||
Arguments =
|
||||
$"{Global.Settings.UDPSocketPort}|{fileFullPath}|{Global.NetchDir}"
|
||||
$"{Global.Settings.UDPSocketPort} \"{fileFullPath}\" \"{Global.NetchDir}\""
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,11 +25,10 @@ namespace NetchUpdater
|
||||
UpdaterFriendlyName = Path.GetFileName(UpdaterFullName);
|
||||
}
|
||||
|
||||
public static void Main(string[] args1)
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
var result = false;
|
||||
|
||||
var args = args1.Aggregate((s, s1) => $"{s} {s1}").Split('|').Select(s => s.Trim()).ToArray();
|
||||
try
|
||||
{
|
||||
#region Check Arguments
|
||||
@@ -87,7 +86,7 @@ namespace NetchUpdater
|
||||
Process.Start(new ProcessStartInfo
|
||||
{
|
||||
FileName = newUpdaterPath,
|
||||
Arguments = $"{port}|{updatePath}|{targetPath}",
|
||||
Arguments = $"{port} \"{updatePath}\" \"{targetPath}\"",
|
||||
WorkingDirectory = tempPath,
|
||||
UseShellExecute = false
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user