fix crash if device is out of space instead of returning error. Thanks @markonikolvski #361

This commit is contained in:
Joshua Hudson 2017-08-01 10:17:37 -07:00
parent 804e9e5a6f
commit e0a74bddd4

View File

@ -388,7 +388,7 @@ NSString *const SSZipArchiveErrorDomain = @"SSZipArchiveErrorDomain";
NSString *message = [NSString stringWithFormat:@"Failed to write file (check your free space)"];
NSLog(@"[SSZipArchive] %@", message);
success = NO;
*error = [NSError errorWithDomain:@"SSZipArchiveErrorDomain" code:SSZipArchiveErrorCodeFailedToWriteFile userInfo:@{NSLocalizedDescriptionKey: message}];
unzippingError = [NSError errorWithDomain:@"SSZipArchiveErrorDomain" code:SSZipArchiveErrorCodeFailedToWriteFile userInfo:@{NSLocalizedDescriptionKey: message}];
break;
}
}