Skip to content

Commit

Permalink
Use Sharp Zip Lib for extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisFeline committed Oct 10, 2024
1 parent f6bf7d8 commit 15cae1c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion ToNSaveManager.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<PackageReference Include="Jint" Version="4.0.2" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="OpenRGB.NET" Version="3.1.1" />
<PackageReference Include="System.IO.Compression.ZipFile" Version="4.3.0" />
<PackageReference Include="SharpZipLib" Version="1.4.2" />
<PackageReference Include="WatsonWebsocket" Version="4.1.2" />
</ItemGroup>

Expand Down
13 changes: 4 additions & 9 deletions Updater.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO.Compression;
using System.Linq;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using ToNSaveManager.Models;
using ICSharpCode.SharpZipLib.Zip;

namespace ToNSaveManager {
internal static class Updater {
Expand Down Expand Up @@ -101,7 +95,8 @@ internal static void Start(GitHubRelease release, GitHubRelease.Asset asset) {

Console.WriteLine("Extracting update files . . .");
Logger.Info("Extracting: " + TempFileLocation);
ZipFile.ExtractToDirectory(TempFileLocation, Program.ProgramDirectory, true);
FastZip zip = new FastZip();
zip.ExtractZip(TempFileLocation, Program.ProgramDirectory, null);

Console.WriteLine("Finishing update . . .");
File.Delete(TempFileLocation); // .zip file cleanup
Expand Down

0 comments on commit 15cae1c

Please sign in to comment.