This commit is contained in:
Joshua Hudson
2016-03-23 16:54:24 -07:00
parent 4f81669eff
commit 8c51a6838f
3 changed files with 52 additions and 48 deletions
+6 -4
View File
@@ -444,11 +444,13 @@
BOOL isDir;
NSString *fullFilePath = [directoryPath stringByAppendingPathComponent:fileName];
[fileManager fileExistsAtPath:fullFilePath isDirectory:&isDir];
if (keepParentDirectory)
{
fileName = [[directoryPath lastPathComponent] stringByAppendingPathComponent:fileName];
}
if (!isDir) {
if (keepParentDirectory)
{
fileName = [[directoryPath lastPathComponent] stringByAppendingPathComponent:fileName];
}
[zipArchive writeFileAtPath:fullFilePath withFileName:fileName withPassword:password];
}
else