Pārlūkot izejas kodu

Remove archive after extraction

Eric Reed 12 gadi atpakaļ
vecāks
revīzija
dd5bb6890e
1 mainītis faili ar 13 papildinājumiem un 0 dzēšanām
  1. 13 0
      MediaBrowser.Installer/MainWindow.xaml.cs

+ 13 - 0
MediaBrowser.Installer/MainWindow.xaml.cs

@@ -212,6 +212,19 @@ namespace MediaBrowser.Installer
             try 
             try 
             {
             {
                 ExtractPackage(archive);
                 ExtractPackage(archive);
+                // We're done with it so delete it (this is necessary for update operations)
+                try
+                {
+                    File.Delete(archive);
+                }
+                catch (FileNotFoundException)
+                {
+                }
+                catch (Exception e)
+                {
+
+                    SystemClose("Error Removing Archive - " + e.GetType().FullName + "\n\n" + e.Message);
+                }
             }
             }
             catch (Exception e)
             catch (Exception e)
             {
             {