From 8a6852c102ec7fc95feb389ecc644260cd62fc24 Mon Sep 17 00:00:00 2001 From: Carlos <1032076755@qq.com> Date: Sat, 30 Dec 2023 20:55:52 +0800 Subject: [PATCH 1/2] fix:Two occurrences of UpdateLogUrl have appeared. --- .../Strategys/PlatformWindows/WindowsStrategy.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/c#/GeneralUpdate.Core/Strategys/PlatformWindows/WindowsStrategy.cs b/src/c#/GeneralUpdate.Core/Strategys/PlatformWindows/WindowsStrategy.cs index 33b9e64..39fd014 100644 --- a/src/c#/GeneralUpdate.Core/Strategys/PlatformWindows/WindowsStrategy.cs +++ b/src/c#/GeneralUpdate.Core/Strategys/PlatformWindows/WindowsStrategy.cs @@ -44,7 +44,7 @@ namespace GeneralUpdate.Core.Strategys.PlatformWindows { var patchPath = FileUtil.GetTempDirectory(PATCHS); var zipFilePath = Path.Combine(Packet.TempPath, $"{version.Name}{Packet.Format}"); - + var context = new BaseContext.Builder() .SetVersion(version) .SetZipfilePath(zipFilePath) @@ -81,7 +81,7 @@ namespace GeneralUpdate.Core.Strategys.PlatformWindows { try { - if (!string.IsNullOrEmpty(Packet.UpdateLogUrl)) Process.Start("explorer.exe", Packet.UpdateLogUrl); + //if (!string.IsNullOrEmpty(Packet.UpdateLogUrl)) Process.Start("explorer.exe", Packet.UpdateLogUrl); var path = Path.Combine(Packet.InstallPath, appName); switch (appType) { @@ -109,7 +109,7 @@ namespace GeneralUpdate.Core.Strategys.PlatformWindows public override string GetPlatform() => PlatformType.Windows; -#endregion Public Methods + #endregion Public Methods #region Private Methods -- Gitee From 340511bcbfe919981ddbeae3a3bd8cea6fb7974f Mon Sep 17 00:00:00 2001 From: Carlos <1032076755@qq.com> Date: Sat, 30 Dec 2023 21:54:32 +0800 Subject: [PATCH 2/2] Modify: InstallPath - Set default running directory --- src/c#/GeneralUpdate.Core/Domain/Entity/Configinfo.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/c#/GeneralUpdate.Core/Domain/Entity/Configinfo.cs b/src/c#/GeneralUpdate.Core/Domain/Entity/Configinfo.cs index 2c1e440..4e4560e 100644 --- a/src/c#/GeneralUpdate.Core/Domain/Entity/Configinfo.cs +++ b/src/c#/GeneralUpdate.Core/Domain/Entity/Configinfo.cs @@ -1,4 +1,5 @@ using System; +using System.IO; namespace GeneralUpdate.Core.Domain.Entity { @@ -15,7 +16,7 @@ namespace GeneralUpdate.Core.Domain.Entity ClientVersion = clientVersion ?? throw new ArgumentNullException(nameof(clientVersion)); UpdateUrl = updateUrl ?? throw new ArgumentNullException(nameof(updateUrl)); UpdateLogUrl = updateLogUrl ?? throw new ArgumentNullException(nameof(updateLogUrl)); - InstallPath = installPath ?? throw new ArgumentNullException(nameof(installPath)); + InstallPath = installPath ?? Directory.GetCurrentDirectory(); MainUpdateUrl = mainUpdateUrl ?? throw new ArgumentNullException(nameof(mainUpdateUrl)); MainAppName = mainAppName ?? throw new ArgumentNullException(nameof(mainAppName)); } -- Gitee