Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
66ab1372d8 | ||
|
|
b64a644f04 | ||
|
|
ddd032f71f | ||
|
|
5bb24be26b | ||
|
|
6fc5255676 | ||
|
|
775a246b2b | ||
|
|
1ff099811e |
@@ -1,5 +1,5 @@
|
||||
PODS:
|
||||
- SSZipArchive (2.0.0)
|
||||
- SSZipArchive (2.0.1)
|
||||
|
||||
DEPENDENCIES:
|
||||
- SSZipArchive (from `..`)
|
||||
@@ -9,7 +9,7 @@ EXTERNAL SOURCES:
|
||||
:path: ".."
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
SSZipArchive: 8153333145bf99acaf1918d257fdcef68a9269e1
|
||||
SSZipArchive: 6678776f378494909195d3f1b3f00d91e76084f9
|
||||
|
||||
PODFILE CHECKSUM: 7f4058a9cbc69b4e63808729577a8bb2098bc527
|
||||
|
||||
|
||||
@@ -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 the latest branch but marked to compile 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
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Pod::Spec.new do |s|
|
||||
s.name = 'SSZipArchive'
|
||||
s.version = '2.0.0'
|
||||
s.version = '2.0.1'
|
||||
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'
|
||||
|
||||
@@ -465,13 +465,34 @@ NSString *const SSZipArchiveErrorDomain = @"SSZipArchiveErrorDomain";
|
||||
[destinationPath appendString:@((const char*)buffer)];
|
||||
}
|
||||
|
||||
// Check if the symlink exists and delete it if we're overwriting
|
||||
if (overwrite)
|
||||
{
|
||||
if ([fileManager fileExistsAtPath:fullPath])
|
||||
{
|
||||
NSError *error = nil;
|
||||
BOOL success = [fileManager removeItemAtPath:fullPath error:&error];
|
||||
if (!success)
|
||||
{
|
||||
NSString *message = [NSString stringWithFormat:@"Failed to delete existing symbolic link at \"%@\"", error.localizedDescription];
|
||||
NSLog(@"[SSZipArchive] %@", message);
|
||||
success = NO;
|
||||
unzippingError = [NSError errorWithDomain:SSZipArchiveErrorDomain code:error.code userInfo:@{NSLocalizedDescriptionKey: message}];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Create the symbolic link (making sure it stays relative if it was relative before)
|
||||
int symlinkError = symlink([destinationPath cStringUsingEncoding:NSUTF8StringEncoding],
|
||||
[fullPath cStringUsingEncoding:NSUTF8StringEncoding]);
|
||||
|
||||
if (symlinkError != 0)
|
||||
{
|
||||
NSLog(@"Failed to create symbolic link at \"%@\" to \"%@\". symlink() error code: %d", fullPath, destinationPath, errno);
|
||||
// Bubble the error up to the completion handler
|
||||
NSString *message = [NSString stringWithFormat:@"Failed to create symbolic link at \"%@\" to \"%@\" - symlink() error code: %d", fullPath, destinationPath, errno];
|
||||
NSLog(@"[SSZipArchive] %@", message);
|
||||
success = NO;
|
||||
unzippingError = [NSError errorWithDomain:NSPOSIXErrorDomain code:symlinkError userInfo:@{NSLocalizedDescriptionKey: message}];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -729,7 +750,9 @@ NSString *const SSZipArchiveErrorDomain = @"SSZipArchiveErrorDomain";
|
||||
uLong permissionsLong = @(permissionsOctal).unsignedLongValue;
|
||||
|
||||
// Store this into the external file attributes once it has been shifted 16 places left to form part of the second from last byte
|
||||
zipInfo.external_fa = permissionsLong << 16L;
|
||||
|
||||
//Casted back to an unsigned int to match type of external_fa in minizip
|
||||
zipInfo.external_fa = (unsigned int)(permissionsLong << 16L);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -791,7 +814,9 @@ NSString *const SSZipArchiveErrorDomain = @"SSZipArchiveErrorDomain";
|
||||
uLong permissionsLong = @(permissionsOctal).unsignedLongValue;
|
||||
|
||||
// Store this into the external file attributes once it has been shifted 16 places left to form part of the second from last byte
|
||||
zipInfo.external_fa = permissionsLong << 16L;
|
||||
|
||||
//Casted back to an unsigned int to match type of external_fa in minizip
|
||||
zipInfo.external_fa = (unsigned int)(permissionsLong << 16L);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
PODS:
|
||||
- SSZipArchive (2.0.0)
|
||||
- SSZipArchive (2.0.1)
|
||||
|
||||
DEPENDENCIES:
|
||||
- SSZipArchive (from `..`)
|
||||
@@ -9,7 +9,7 @@ EXTERNAL SOURCES:
|
||||
:path: ".."
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
SSZipArchive: 8153333145bf99acaf1918d257fdcef68a9269e1
|
||||
SSZipArchive: 6678776f378494909195d3f1b3f00d91e76084f9
|
||||
|
||||
PODFILE CHECKSUM: 0dc500eb72745751ccba7677de4da5534fcef36d
|
||||
|
||||
|
||||
Reference in New Issue
Block a user