Skip to content

Commit

Permalink
Use SharpZipLib instead of System.IO.Compression for zip file handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Kai Ito committed Jan 7, 2017
1 parent 2fe773f commit 02322fa
Show file tree
Hide file tree
Showing 11 changed files with 118 additions and 488 deletions.
4 changes: 2 additions & 2 deletions Cursed.Base/AssemblyInfo.fs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
namespace System
open System.Reflection

[<assembly: AssemblyVersionAttribute("1.2.1")>]
[<assembly: AssemblyVersionAttribute("1.2.2")>]
do ()

module internal AssemblyVersionInformation =
let [<Literal>] AssemblyVersion = "1.2.1"
let [<Literal>] AssemblyVersion = "1.2.2"
7 changes: 3 additions & 4 deletions Cursed.Base/ModpackController.fs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ open System.IO
open Common
open Hopac
open HttpFs.Client

open Unzip

module ModpackController =
Expand Down Expand Up @@ -35,10 +36,8 @@ module ModpackController =
let ExtractZip location ((zipName: string), (zipLocation: string)) =
let modpackSubdirectory = zipName.Substring(0, zipName.LastIndexOf('.'))
let extractLocation = location @@ modpackSubdirectory @@ "minecraft"

using (new Unzip(zipLocation @@ zipName)) (fun zip ->
zip.ExtractToDirectory(extractLocation)
)

Zip.ExtractZipFile(zipLocation @@ zipName, extractLocation)

let fileInfo = new FileInfo(zipLocation @@ zipName)
fileInfo.Delete()
Expand Down
4 changes: 2 additions & 2 deletions Cursed/AssemblyInfo.fs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
namespace System
open System.Reflection

[<assembly: AssemblyVersionAttribute("1.2.1")>]
[<assembly: AssemblyVersionAttribute("1.2.2")>]
do ()

module internal AssemblyVersionInformation =
let [<Literal>] AssemblyVersion = "1.2.1"
let [<Literal>] AssemblyVersion = "1.2.2"
Loading

0 comments on commit 02322fa

Please sign in to comment.