Explorar o código

Always copy installer during update

flabbet hai 3 meses
pai
achega
074fa15ea8

+ 0 - 11
src/PixiEditor.UpdateModule/UpdateInstaller.cs

@@ -113,17 +113,6 @@ public class UpdateInstaller
             dirWithFiles = Directory.GetDirectories(UpdateFilesPath)[0];
         }
 
-        string updaterFile = Path.Combine(dirWithFiles,
-            "PixiEditor.UpdateInstaller" + (OperatingSystem.IsWindows() ? ".exe" : ""));
-
-        if (File.Exists(updaterFile))
-        {
-            string newName = Path.Combine(dirWithFiles,
-                "PixiEditor.UpdateInstaller-update" + (OperatingSystem.IsWindows() ? ".exe" : ""));
-            File.Move(updaterFile, newName);
-            log.AppendLine($"Renamed {updaterFile} to {newName}");
-        }
-
         log.AppendLine($"Copying files from {dirWithFiles} to {TargetDirectory}");
 
         try

+ 1 - 1
src/PixiEditor/ViewModels/SubViewModels/UpdateViewModel.cs

@@ -284,7 +284,7 @@ internal class UpdateViewModel : SubViewModel<ViewModelMain>
             return;
         }
         
-        if (IOperatingSystem.Current.IsMacOs && Path.Exists(updaterPath))
+        if (Path.Exists(updaterPath))
         {
             File.Copy(updaterPath, Path.Join(UpdateDownloader.DownloadLocation, $"PixiEditor.UpdateInstaller"), true);
             updaterPath = Path.Join(UpdateDownloader.DownloadLocation, $"PixiEditor.UpdateInstaller");