diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-03-28 13:06:40 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-03-28 13:06:40 -0400 |
| commit | d2401579da5e9d09431ba478a6926e46a8b8b9ed (patch) | |
| tree | e106f383fc07d9599bfca0eaeb7473880236dcce | |
| parent | 9839c8d7a341f2fe6e19aab6a6cc3e1fe8df15cc (diff) | |
| parent | 7eabf7e0153d4b3574c44c72d2a8c2a14d867bc2 (diff) | |
Merge branch 'master' of https://github.com/MediaBrowser/MediaBrowser
| -rw-r--r-- | MediaBrowser.Installer/MainWindow.xaml.cs | 28 | ||||
| -rw-r--r-- | MediaBrowser.Installer/MediaBrowser.Installer.csproj | 2 |
2 files changed, 25 insertions, 5 deletions
diff --git a/MediaBrowser.Installer/MainWindow.xaml.cs b/MediaBrowser.Installer/MainWindow.xaml.cs index 4826c3d22..3d60274b1 100644 --- a/MediaBrowser.Installer/MainWindow.xaml.cs +++ b/MediaBrowser.Installer/MainWindow.xaml.cs @@ -409,14 +409,34 @@ namespace MediaBrowser.Installer } // And extract - using (var fileStream = File.OpenRead(archive)) + var retryCount = 0; + var success = false; + while (!success && retryCount < 3) { - using (var zipFile = ZipFile.Read(fileStream)) + try { - zipFile.ExtractAll(RootPath, ExtractExistingFileAction.OverwriteSilently); + using (var fileStream = File.OpenRead(archive)) + { + using (var zipFile = ZipFile.Read(fileStream)) + { + zipFile.ExtractAll(RootPath, ExtractExistingFileAction.OverwriteSilently); + success = true; + } + } + } + catch + { + if (retryCount < 3) + { + Thread.Sleep(250); + retryCount++; + } + else + { + throw; + } } } - } /// <summary> diff --git a/MediaBrowser.Installer/MediaBrowser.Installer.csproj b/MediaBrowser.Installer/MediaBrowser.Installer.csproj index e5540966c..0c11ceb04 100644 --- a/MediaBrowser.Installer/MediaBrowser.Installer.csproj +++ b/MediaBrowser.Installer/MediaBrowser.Installer.csproj @@ -31,7 +31,7 @@ <PublisherName>Media Browser Team</PublisherName> <SuiteName>Media Browser</SuiteName> <OpenBrowserOnPublish>false</OpenBrowserOnPublish> - <ApplicationRevision>51</ApplicationRevision> + <ApplicationRevision>53</ApplicationRevision> <ApplicationVersion>0.1.1.%2a</ApplicationVersion> <UseApplicationTrust>false</UseApplicationTrust> <PublishWizardCompleted>true</PublishWizardCompleted> |
