File tree Expand file tree Collapse file tree 1 file changed +15
-16
lines changed Expand file tree Collapse file tree 1 file changed +15
-16
lines changed Original file line number Diff line number Diff line change @@ -434,24 +434,23 @@ + (BOOL)unzipFileAtPath:(NSString *)path
434434 }
435435
436436 if  (fp) {
437-  if  (nestedZipLevel && [fullPath.pathExtension.lowercaseString isEqualToString: @" zip" 
438-  if  ([self  unzipFileAtPath: fullPath
439-  toDestination: fullPath.stringByDeletingLastPathComponent
440-  preserveAttributes: preserveAttributes
441-  overwrite: overwrite
442-  nestedZipLevel: nestedZipLevel - 1 
443-  password: password
444-  error: nil 
445-  delegate: nil 
446-  progressHandler: nil 
447-  completionHandler: nil ]) {
448-  [[NSFileManager  defaultManager ] removeItemAtPath: fullPath error: nil ];
449-  }
450-  }
451-  
452437 fclose (fp);
453438
454-  if  (preserveAttributes) {
439+  if  (nestedZipLevel
440+  && [fullPath.pathExtension.lowercaseString isEqualToString: @" zip" 
441+  && [self  unzipFileAtPath: fullPath
442+  toDestination: fullPath.stringByDeletingLastPathComponent
443+  preserveAttributes: preserveAttributes
444+  overwrite: overwrite
445+  nestedZipLevel: nestedZipLevel - 1 
446+  password: password
447+  error: nil 
448+  delegate: nil 
449+  progressHandler: nil 
450+  completionHandler: nil ]) {
451+  [directoriesModificationDates removeLastObject ];
452+  [[NSFileManager  defaultManager ] removeItemAtPath: fullPath error: nil ];
453+  } else  if  (preserveAttributes) {
455454
456455 //  Set the original datetime property
457456 if  (fileInfo.dos_date  != 0 ) {
                         You can’t perform that action at this time. 
           
                  
0 commit comments