diff --git a/.travis.yml b/.travis.yml index 8302af5..cc2ab93 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,5 +3,5 @@ osx_image: xcode8.3 podfile: ObjectiveCExample/Podfile xcode_workspace: ObjectiveCExample/ObjectiveCExample.xcworkspace xcode_scheme: ObjectiveCExample -script: xcodebuild -workspace ObjectiveCExample/ObjectiveCExample.xcworkspace -scheme ObjectiveCExample -sdk iphonesimulator -destination "id=99F4F45C-3B72-4473-A6C5-3FD81EF3C25D" -configuration Debug ONLY_ACTIVE_ARCH=NO ENABLE_TESTABILITY=YES test +script: xcodebuild -workspace ObjectiveCExample/ObjectiveCExample.xcworkspace -scheme ObjectiveCExample -sdk iphonesimulator -destination "id=F60B87EC-8969-41A7-90ED-D0826ECC32DB" -configuration Debug ONLY_ACTIVE_ARCH=NO ENABLE_TESTABILITY=YES test diff --git a/SSZipArchive/SSZipArchive.h b/SSZipArchive/SSZipArchive.h index 4aa2dba..4afb9c5 100755 --- a/SSZipArchive/SSZipArchive.h +++ b/SSZipArchive/SSZipArchive.h @@ -17,7 +17,7 @@ NS_ASSUME_NONNULL_BEGIN extern NSString *const SSZipArchiveErrorDomain; typedef NS_ENUM(NSInteger, SSZipArchiveErrorCode) { SSZipArchiveErrorCodeFailedOpenZipFile = -1, - SSZipArchiveErrorCodeFailedOpenFirstFile = -2, + SSZipArchiveErrorCodeFailedOpenFileInZip = -2, SSZipArchiveErrorCodeFileInfoNotLoadable = -3, SSZipArchiveErrorCodeFileContentNotReadable = -4, }; diff --git a/SSZipArchive/SSZipArchive.m b/SSZipArchive/SSZipArchive.m index cd87b50..8554daf 100755 --- a/SSZipArchive/SSZipArchive.m +++ b/SSZipArchive/SSZipArchive.m @@ -88,7 +88,7 @@ NSString *const SSZipArchiveErrorDomain = @"SSZipArchiveErrorDomain"; if (ret != UNZ_BADPASSWORD) { if (error) { *error = [NSError errorWithDomain:SSZipArchiveErrorDomain - code:SSZipArchiveErrorCodeFailedOpenFirstFile + code:SSZipArchiveErrorCodeFailedOpenFileInZip userInfo:@{NSLocalizedDescriptionKey: @"failed to open first file in zip file"}]; } } @@ -218,7 +218,7 @@ NSString *const SSZipArchiveErrorDomain = @"SSZipArchiveErrorDomain"; if (unzGoToFirstFile(zip) != UNZ_OK) { NSDictionary *userInfo = @{NSLocalizedDescriptionKey: @"failed to open first file in zip file"}; - NSError *err = [NSError errorWithDomain:SSZipArchiveErrorDomain code:SSZipArchiveErrorCodeFailedOpenFirstFile userInfo:userInfo]; + NSError *err = [NSError errorWithDomain:SSZipArchiveErrorDomain code:SSZipArchiveErrorCodeFailedOpenFileInZip userInfo:userInfo]; if (error) { *error = err; @@ -257,7 +257,7 @@ NSString *const SSZipArchiveErrorDomain = @"SSZipArchiveErrorDomain"; } if (ret != UNZ_OK) { - unzippingError = [NSError errorWithDomain:@"SSZipArchiveErrorDomain" code:-2 userInfo:@{NSLocalizedDescriptionKey: @"failed to open file in zip file"}]; + unzippingError = [NSError errorWithDomain:@"SSZipArchiveErrorDomain" code:SSZipArchiveErrorCodeFailedOpenFileInZip userInfo:@{NSLocalizedDescriptionKey: @"failed to open file in zip file"}]; success = NO; break; } @@ -268,7 +268,7 @@ NSString *const SSZipArchiveErrorDomain = @"SSZipArchiveErrorDomain"; ret = unzGetCurrentFileInfo(zip, &fileInfo, NULL, 0, NULL, 0, NULL, 0); if (ret != UNZ_OK) { - unzippingError = [NSError errorWithDomain:@"SSZipArchiveErrorDomain" code:-3 userInfo:@{NSLocalizedDescriptionKey: @"failed to retrieve info for file"}]; + unzippingError = [NSError errorWithDomain:@"SSZipArchiveErrorDomain" code:SSZipArchiveErrorCodeFileInfoNotLoadable userInfo:@{NSLocalizedDescriptionKey: @"failed to retrieve info for file"}]; success = NO; unzCloseCurrentFile(zip); break;