From 4c34c0abee8b154d02295a9be58c7bd2713dd7b0 Mon Sep 17 00:00:00 2001 From: Ravi Patel Date: Sat, 29 Apr 2023 18:00:50 +0530 Subject: [PATCH] Now only adding current command line arguments if they exist. --- AutoUpdater.NET/DownloadUpdateDialog.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AutoUpdater.NET/DownloadUpdateDialog.cs b/AutoUpdater.NET/DownloadUpdateDialog.cs index 5e4da9a0..15977cd6 100644 --- a/AutoUpdater.NET/DownloadUpdateDialog.cs +++ b/AutoUpdater.NET/DownloadUpdateDialog.cs @@ -208,7 +208,7 @@ private void WebClientOnDownloadFileCompleted(object sender, AsyncCompletedEvent } string[] args = Environment.GetCommandLineArgs(); - if (args.Length > 0) + if (args.Length > 1) { arguments.Add("--args"); arguments.Add(string.Join(" ", args.Skip(1).Select(arg => $"\"{arg}\"")));