Index: utils/ofzip/TarArchive.m ================================================================== --- utils/ofzip/TarArchive.m +++ utils/ofzip/TarArchive.m @@ -248,10 +248,11 @@ OFTarArchiveEntry *entry; while ((entry = [_archive nextEntry]) != nil) { void *pool = objc_autoreleasePoolPush(); OFString *fileName = [entry fileName]; + of_tar_archive_entry_type_t type = [entry type]; OFString *outFileName = [fileName stringByStandardizingPath]; OFArray OF_GENERIC(OFString *) *pathComponents; OFString *directory; OFFile *output; OFStream *stream; @@ -259,11 +260,12 @@ int8_t percent = -1, newPercent; if (!all && ![files containsObject: fileName]) continue; - if ([entry type] != OF_TAR_ARCHIVE_ENTRY_TYPE_FILE) { + if (type != OF_TAR_ARCHIVE_ENTRY_TYPE_FILE && + type != OF_TAR_ARCHIVE_ENTRY_TYPE_DIRECTORY) { if (app->_outputLevel >= 0) [of_stdout writeLine: OF_LOCALIZED( @"skipping_file", @"Skipping %[file]...", @"file", fileName)]; @@ -304,11 +306,13 @@ if (app->_outputLevel >= 0) [of_stdout writeString: OF_LOCALIZED(@"extracting_file", @"Extracting %[file]...", @"file", fileName)]; - if ([fileName hasSuffix: @"/"]) { + if (type == OF_TAR_ARCHIVE_ENTRY_TYPE_DIRECTORY || + (type == OF_TAR_ARCHIVE_ENTRY_TYPE_FILE && + [fileName hasSuffix: @"/"])) { [fileManager createDirectoryAtPath: outFileName createParents: true]; setPermissions(outFileName, entry); if (app->_outputLevel >= 0) {