Merge pull request #281 from simerjots/dev-fileoption

Extended to allow passing in directory or file to unzip to
This commit is contained in:
Joshua Hudson
2016-09-13 10:43:41 -07:00
committed by GitHub
+10 -1
View File
@@ -272,7 +272,16 @@
strPath = [strPath stringByReplacingOccurrencesOfString:@"\\" withString:@"/"];
}
NSString *fullPath = [destination stringByAppendingPathComponent:strPath];
NSString *fullPath;
BOOL isDir = NO;
if([[NSFileManager defaultManager]
fileExistsAtPath:destination isDirectory:&isDir] && isDir){
fullPath = [destination stringByAppendingPathComponent:strPath];
}
else {
fullPath = destination;
}
NSError *err = nil;
NSDictionary *directoryAttr;
if (preserveAttributes) {