11 Commits

Author SHA1 Message Date
Joshua Hudson
77054d5ca5 update test pods 2017-08-28 15:20:02 -07:00
Antoine Cœur
123e801b82 podspec bump 2017-08-25 13:58:28 +08:00
Antoine Cœur
77892c97d8 Merge pull request #368 from RobertCain/analyze-success
Fixes Analyze issue for success variable
2017-08-25 13:57:53 +08:00
Robert Cain
790b2c1454 Fixes Analyze: Local variable conflicts
with outer success variable
2017-08-24 17:45:08 +01:00
Joshua Hudson
528ca5694b Update README.md 2017-08-10 09:25:22 -07:00
Joshua Hudson
b4d11dffc9 Merge pull request #363 from ibsh/master
Handle zero-length arguments
2017-08-01 20:10:45 -07:00
Ibrahim Sha'ath
6781d97343 Guard against the receipt of empty paths 2017-08-01 16:08:00 -07:00
Ibrahim Sha'ath
2a248f6b55 Add missing nullability specifier 2017-08-01 16:07:22 -07:00
Joshua Hudson
55b067b11c Podlock updates 2017-08-01 12:27:12 -07:00
Joshua Hudson
889e4293d1 podspec bump 2017-08-01 12:15:50 -07:00
Joshua Hudson
e0a74bddd4 fix crash if device is out of space instead of returning error. Thanks @markonikolvski #361 2017-08-01 10:17:37 -07:00
8 changed files with 38 additions and 21 deletions

View File

@@ -344,11 +344,11 @@
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-testing_pods-ObjectiveCExampleTests-checkManifestLockResult.txt",
"$(DERIVED_FILE_DIR)/Pods-ObjectiveCExampleTests-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
486F364061BAD3921A1CA2C8 /* [CP] Embed Pods Frameworks */ = {
@@ -357,7 +357,7 @@
files = (
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-testing_pods-ObjectiveCExampleTests/Pods-testing_pods-ObjectiveCExampleTests-frameworks.sh",
"${SRCROOT}/Pods/Target Support Files/Pods-ObjectiveCExampleTests/Pods-ObjectiveCExampleTests-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/SSZipArchive/SSZipArchive.framework",
);
name = "[CP] Embed Pods Frameworks";
@@ -395,11 +395,11 @@
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-testing_pods-ObjectiveCExample-checkManifestLockResult.txt",
"$(DERIVED_FILE_DIR)/Pods-ObjectiveCExample-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
CA0F9A9BDCCC5F900FD55CF3 /* [CP] Embed Pods Frameworks */ = {
@@ -408,7 +408,7 @@
files = (
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-testing_pods-ObjectiveCExample/Pods-testing_pods-ObjectiveCExample-frameworks.sh",
"${SRCROOT}/Pods/Target Support Files/Pods-ObjectiveCExample/Pods-ObjectiveCExample-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/SSZipArchive/SSZipArchive.framework",
);
name = "[CP] Embed Pods Frameworks";

View File

@@ -1,16 +1,16 @@
PODS:
- SSZipArchive (2.0.2)
- SSZipArchive (2.0.4)
DEPENDENCIES:
- SSZipArchive (from `..`)
EXTERNAL SOURCES:
SSZipArchive:
:path: ".."
:path: ..
SPEC CHECKSUMS:
SSZipArchive: 5fdf578dbbb60000b23439f80fa04e81d00740ee
SSZipArchive: c77fc6ec8194f4e6d57876da1348e46cd63b90ba
PODFILE CHECKSUM: 7f4058a9cbc69b4e63808729577a8bb2098bc527
COCOAPODS: 1.2.1
COCOAPODS: 1.3.1

View File

@@ -14,7 +14,7 @@ ZipArchive is a simple utility class for zipping and unzipping files on iOS and
## Installation and Setup
*The main release branch is configured to support Objective C and Swift 3. There is a 'swift23' branch which is a tied to a older 1.x release and will not be upgraded. Xcode 8.3+ removes support for Swift 2.3*
*The main release branch is configured to support Objective C and Swift 3+. There is a 'swift23' branch which is a tied to a older 1.x release and will not be upgraded. Xcode 8.3+ removes support for Swift 2.3*
### CocoaPods
In your Podfile:

View File

@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'SSZipArchive'
s.version = '2.0.2'
s.version = '2.0.4'
s.summary = 'Utility class for zipping and unzipping files on iOS, tvOS, watchOS, and Mac.'
s.description = 'SSZipArchive is a simple utility class for zipping and unzipping files on iOS, tvOS, watchOS, and Mac.'
s.homepage = 'https://github.com/ZipArchive/ZipArchive'

View File

@@ -21,6 +21,7 @@ typedef NS_ENUM(NSInteger, SSZipArchiveErrorCode) {
SSZipArchiveErrorCodeFileInfoNotLoadable = -3,
SSZipArchiveErrorCodeFileContentNotReadable = -4,
SSZipArchiveErrorCodeFailedToWriteFile = -5,
SSZipArchiveErrorCodeInvalidArguments = -6,
};
@protocol SSZipArchiveDelegate;

View File

@@ -184,12 +184,28 @@ NSString *const SSZipArchiveErrorDomain = @"SSZipArchiveErrorDomain";
toDestination:(NSString *)destination
preserveAttributes:(BOOL)preserveAttributes
overwrite:(BOOL)overwrite
password:(NSString *)password
password:(nullable NSString *)password
error:(NSError **)error
delegate:(id<SSZipArchiveDelegate>)delegate
progressHandler:(void (^)(NSString *entry, unz_file_info zipInfo, long entryNumber, long total))progressHandler
completionHandler:(void (^)(NSString *path, BOOL succeeded, NSError * __nullable error))completionHandler
{
// Guard against empty strings
if ([path length] == 0 || [destination length] == 0)
{
NSDictionary *userInfo = @{NSLocalizedDescriptionKey: @"received invalid argument(s)"};
NSError *err = [NSError errorWithDomain:SSZipArchiveErrorDomain code:SSZipArchiveErrorCodeInvalidArguments userInfo:userInfo];
if (error)
{
*error = err;
}
if (completionHandler)
{
completionHandler(nil, NO, err);
}
}
// Begin opening
zipFile zip = unzOpen((const char*)[path fileSystemRepresentation]);
if (zip == NULL)
@@ -388,7 +404,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;
}
}
@@ -475,8 +491,8 @@ NSString *const SSZipArchiveErrorDomain = @"SSZipArchiveErrorDomain";
if ([fileManager fileExistsAtPath:fullPath])
{
NSError *error = nil;
BOOL success = [fileManager removeItemAtPath:fullPath error:&error];
if (!success)
BOOL removeSuccess = [fileManager removeItemAtPath:fullPath error:&error];
if (!removeSuccess)
{
NSString *message = [NSString stringWithFormat:@"Failed to delete existing symbolic link at \"%@\"", error.localizedDescription];
NSLog(@"[SSZipArchive] %@", message);

View File

@@ -1,16 +1,16 @@
PODS:
- SSZipArchive (2.0.2)
- SSZipArchive (2.0.4)
DEPENDENCIES:
- SSZipArchive (from `..`)
EXTERNAL SOURCES:
SSZipArchive:
:path: ".."
:path: ..
SPEC CHECKSUMS:
SSZipArchive: 5fdf578dbbb60000b23439f80fa04e81d00740ee
SSZipArchive: c77fc6ec8194f4e6d57876da1348e46cd63b90ba
PODFILE CHECKSUM: 0dc500eb72745751ccba7677de4da5534fcef36d
COCOAPODS: 1.2.1
COCOAPODS: 1.3.1

View File

@@ -339,7 +339,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */