Fixed zip archive method definition

This commit is contained in:
nikita.kosilo
2020-10-23 15:22:31 +03:00
parent 334c7bb78d
commit 0f638a9e94
2 changed files with 2 additions and 1 deletions

View File

@@ -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<NSString *> *)paths diskSize:(int)diskSize;
+ (BOOL)createZipFileAtPath:(NSString *)path withFilesAtPaths:(NSArray<NSString *> *)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;

View File

@@ -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];
}