From dd5bb6890eed6643cae15fac8b5adc1372baa04a Mon Sep 17 00:00:00 2001 From: Eric Reed Date: Sat, 2 Mar 2013 12:41:00 -0500 Subject: [PATCH] Remove archive after extraction --- MediaBrowser.Installer/MainWindow.xaml.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/MediaBrowser.Installer/MainWindow.xaml.cs b/MediaBrowser.Installer/MainWindow.xaml.cs index 6f64ded86d..a85a0cb9a4 100644 --- a/MediaBrowser.Installer/MainWindow.xaml.cs +++ b/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) {