Skip to content

Commit

Permalink
Fix a bug in updater causing update zip file to fail to extract becau…
Browse files Browse the repository at this point in the history
…se the target directory contains file with the same name.
  • Loading branch information
JetStream96 committed Feb 17, 2017
1 parent 7f1facb commit a574ef7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/QSP/Updates/Updater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.Linq;
using System.Net;
using System.Xml.Linq;
using QSP.LibraryExtension;
using QSP.LibraryExtension.XmlSerialization;
using static QSP.Utilities.LoggerInstance;
using static QSP.Utilities.ExceptionHelpers;
Expand Down Expand Up @@ -141,7 +142,11 @@ public static void Install(UpdateInfo info)
client.DownloadFile(info.Uri, zipFilePath);
}

IOMethods.ClearDirectory(extractDir);

// This creates extractDir if necessary.
ZipFile.ExtractToDirectory(zipFilePath, extractDir);

IgnoreException(() => File.Delete(zipFilePath));
}

Expand Down

0 comments on commit a574ef7

Please sign in to comment.