Browse Source

Remove archive after extraction

Eric Reed 12 years ago
parent
commit
dd5bb6890e
1 changed files with 13 additions and 0 deletions
  1. 13 0
      MediaBrowser.Installer/MainWindow.xaml.cs

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

@@ -212,6 +212,19 @@ namespace MediaBrowser.Installer
             try 
             {
                 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)
             {