From dac54daf9599136995ce290fae7cdb2a75493d0b Mon Sep 17 00:00:00 2001 From: Pilzinsel64 Date: Fri, 30 Aug 2024 10:52:45 +0200 Subject: [PATCH] only cleanup if package is zip type --- Pilz.Updating.Client/UpdateClient.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Pilz.Updating.Client/UpdateClient.cs b/Pilz.Updating.Client/UpdateClient.cs index 08736b0..8f3c066 100644 --- a/Pilz.Updating.Client/UpdateClient.cs +++ b/Pilz.Updating.Client/UpdateClient.cs @@ -188,8 +188,11 @@ public class UpdateClient(string updateUrl, AppVersion currentVersion, Channels // Delete Package RaiseStatusChanged(UpdateStatus.Cleanup, UpdateStatusEvent.PreEvent); - File.Delete(packagePath); - Directory.Delete(dataPath, true); + if (package.Type == PackageType.Zip) + { + File.Delete(packagePath); + Directory.Delete(dataPath, true); + } RaiseStatusChanged(UpdateStatus.Cleanup, UpdateStatusEvent.PostEvent); // Finish