From db911cf076080ad11ecc6e71baacacb440dce6fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20C=C5=93ur?= Date: Thu, 22 Jun 2017 03:28:37 +0800 Subject: [PATCH 1/2] same FailedOpen error code is used for other files too --- SSZipArchive/SSZipArchive.h | 2 +- SSZipArchive/SSZipArchive.m | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) 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 578a724..18d0693 100755 --- a/SSZipArchive/SSZipArchive.m +++ b/SSZipArchive/SSZipArchive.m @@ -87,7 +87,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"}]; } } @@ -217,7 +217,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; @@ -256,7 +256,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; } @@ -267,7 +267,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; From 1a2e6cad09682eeb5f3126dbd2db5d5259bd157f Mon Sep 17 00:00:00 2001 From: Joshua Hudson Date: Tue, 27 Jun 2017 07:57:36 -0700 Subject: [PATCH 2/2] Fix travis.yml to point to latest iPhone 7 plus image --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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