Commit 59323943 authored by Roy Marmelstein's avatar Roy Marmelstein

Build changes

parent 4e906f7f
This diff is collapsed.
...@@ -29,8 +29,6 @@ public class Zip { ...@@ -29,8 +29,6 @@ public class Zip {
guard let zip: zipFile = unzOpen(path) else { guard let zip: zipFile = unzOpen(path) else {
throw ZipError.UnzipError throw ZipError.UnzipError
} }
let fileAttributes = try NSFileManager.defaultManager().attributesOfItemAtPath(path)
let fileSize = fileAttributes[NSFileSize]
var currentPosition = 0.0 var currentPosition = 0.0
var globalInfo: unz_global_info = unz_global_info(number_entry: 0, number_disk_with_CD: 0, size_comment: 0) var globalInfo: unz_global_info = unz_global_info(number_entry: 0, number_disk_with_CD: 0, size_comment: 0)
unzGetGlobalInfo(zip, &globalInfo) unzGetGlobalInfo(zip, &globalInfo)
...@@ -38,14 +36,12 @@ public class Zip { ...@@ -38,14 +36,12 @@ public class Zip {
if unzGoToFirstFile(zip) != UNZ_OK { if unzGoToFirstFile(zip) != UNZ_OK {
throw ZipError.UnzipError throw ZipError.UnzipError
} }
let canceled = false
var ret: Int32 = 0 var ret: Int32 = 0
var crc_ret: Int32 = 0 var crc_ret: Int32 = 0
let bufferSize = 4096 let bufferSize = 4096
var buffer = Array<CUnsignedChar>(count: bufferSize, repeatedValue: 0) var buffer = Array<CUnsignedChar>(count: bufferSize, repeatedValue: 0)
let fileManager = NSFileManager.defaultManager() let fileManager = NSFileManager.defaultManager()
var directoriesModificationDates = NSMutableSet()
if let password = password where password.characters.count > 0 { if let password = password where password.characters.count > 0 {
ret = unzOpenCurrentFilePassword(zip, password.cStringUsingEncoding(NSASCIIStringEncoding)!) ret = unzOpenCurrentFilePassword(zip, password.cStringUsingEncoding(NSASCIIStringEncoding)!)
} }
......
#ifndef ZipCommon #ifndef SSZipCommon
#define ZipCommon #define SSZipCommon
/* tm_unz contain date/time info */ /* tm_unz contain date/time info */
typedef struct tm_unz_s typedef struct tm_unz_s
......
module minizip [system][extern_c] {
header "unzip.h"
header "zip.h"
export *
}
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
See the accompanying LICENSE file for the full text of the license. See the accompanying LICENSE file for the full text of the license.
*/ */
#include "common.h" #include "Common.h"
#ifndef _UNZ_H #ifndef _UNZ_H
#define _UNZ_H #define _UNZ_H
......
module minizip [system] {
header "include.h"
export *
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment