Skip to content

Commit 556856f

Browse files
committed
Fix SSZipArchive import and failure detection
1 parent ceb22b0 commit 556856f

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

ObjectiveGitTests/QuickSpec+GTFixtures.m

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#import <ObjectiveGit/ObjectiveGit.h>
1010
#import "QuickSpec+GTFixtures.h"
1111
#import <objc/runtime.h>
12-
#import <SSZipArchive/SSZipArchive.h>
12+
#import "SSZipArchive.h"
1313

1414
static const NSInteger FixturesErrorUnzipFailed = 666;
1515

@@ -102,7 +102,14 @@ - (BOOL)unzipFile:(NSString *)member fromArchiveAtPath:(NSString *)zipPath intoD
102102
//
103103
// system() and NSTask() are not available when running tests in the iOS simulator
104104

105-
[SSZipArchive unzipFileAtPath:zipPath toDestination:[destinationPath stringByAppendingString:member]];
105+
BOOL success = [SSZipArchive unzipFileAtPath:zipPath toDestination:[destinationPath stringByAppendingString:member] overwrite:YES password:nil error:error];
106+
107+
if (!success) {
108+
NSLog(@"Unzip failed");
109+
return NO;
110+
}
111+
112+
return YES;
106113

107114
#else
108115
// OS X: shell out to unzip using NSTask

0 commit comments

Comments
 (0)