From 0f638a9e941b5638137237a6b84691bd2044d56a Mon Sep 17 00:00:00 2001 From: "nikita.kosilo" Date: Fri, 23 Oct 2020 15:22:31 +0300 Subject: [PATCH] Fixed zip archive method definition --- SSZipArchive/SSZipArchive.h | 1 + SSZipArchive/SSZipArchive.m | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/SSZipArchive/SSZipArchive.h b/SSZipArchive/SSZipArchive.h index 17af8e4..d5f3eea 100755 --- a/SSZipArchive/SSZipArchive.h +++ b/SSZipArchive/SSZipArchive.h @@ -91,6 +91,7 @@ typedef NS_ENUM(NSInteger, SSZipArchiveErrorCode) { // with optional password, default encryption is AES // don't use AES if you need compatibility with native macOS unzip and Archive Utility ++ (BOOL)createZipFileAtPath:(NSString *)path withFilesAtPaths:(NSArray *)paths diskSize:(int)diskSize; + (BOOL)createZipFileAtPath:(NSString *)path withFilesAtPaths:(NSArray *)paths withPassword:(nullable NSString *)password; + (BOOL)createZipFileAtPath:(NSString *)path withContentsOfDirectory:(NSString *)directoryPath withPassword:(nullable NSString *)password; + (BOOL)createZipFileAtPath:(NSString *)path withContentsOfDirectory:(NSString *)directoryPath keepParentDirectory:(BOOL)keepParentDirectory withPassword:(nullable NSString *)password; diff --git a/SSZipArchive/SSZipArchive.m b/SSZipArchive/SSZipArchive.m index ba6cd39..3c07a49 100755 --- a/SSZipArchive/SSZipArchive.m +++ b/SSZipArchive/SSZipArchive.m @@ -673,7 +673,7 @@ BOOL _fileIsSymbolicLink(const unz_file_info *fileInfo); BOOL success = [zipArchive openWithSplitSize:diskSize]; if (success) { for (NSString *filePath in paths) { - success &= [zipArchive writeFile:filePath withPassword:password]; + success &= [zipArchive writeFile:filePath withPassword:nil]; } success &= [zipArchive close]; }