Index: src/OFTarArchiveEntry.m ================================================================== --- src/OFTarArchiveEntry.m +++ src/OFTarArchiveEntry.m @@ -176,6 +176,31 @@ if (_size % 512 != 0) [_stream readIntoBuffer: buffer exactLength: 512 - (_size % 512)]; } + +- (OFString*)description +{ + void *pool = objc_autoreleasePoolPush(); + OFString *ret = [OFString stringWithFormat: @"<%@: %p\n" + @"\tFile name = %@\n" + @"\tMode = %06o\n" + @"\tSize = %" PRIu64 @"\n" + @"\tModification date = %@\n" + @"\tType = %u\n" + @"\tTarget file name = %@\n" + @"\tOwner = %@\n" + @"\tGroup = %@\n" + @"\tDevice major = %" PRIu32 @"\n" + @"\tDevice minor = %" PRIu32 @"\n" + @">", + [self class], self, _fileName, _mode, _size, _modificationDate, + _type, _targetFileName, _owner, _group, _deviceMajor, _deviceMinor]; + + [ret retain]; + + objc_autoreleasePoolPop(pool); + + return [ret autorelease]; +} @end Index: src/OFZIPArchiveEntry.m ================================================================== --- src/OFZIPArchiveEntry.m +++ src/OFZIPArchiveEntry.m @@ -265,28 +265,28 @@ } - (OFString*)description { void *pool = objc_autoreleasePoolPush(); - OFDate *modificationDate = [self modificationDate]; - OFString *ret; - - ret = [[OFString alloc] initWithFormat: @"<%@: %p\n" + OFString *ret = [OFString stringWithFormat: @"<%@: %p\n" @"\tFile name = %@\n" @"\tFile comment = %@\n" @"\tGeneral purpose bit flag = %u\n" @"\tCompression method = %u\n" @"\tCompressed size = %ju\n" @"\tUncompressed size = %ju\n" @"\tModification date = %@\n" @"\tCRC32 = %" @PRIu32 @"\n" @"\tExtra field = %@\n" - @"}", + @">", [self class], self, _fileName, _fileComment, _generalPurposeBitFlag, _compressionMethod, (intmax_t)_compressedSize, - (intmax_t)_uncompressedSize, modificationDate, _CRC32, _extraField]; + (intmax_t)_uncompressedSize, [self modificationDate], _CRC32, + _extraField]; + + [ret retain]; objc_autoreleasePoolPop(pool); return [ret autorelease]; } @end Index: utils/ofzip/TarArchive.m ================================================================== --- utils/ofzip/TarArchive.m +++ utils/ofzip/TarArchive.m @@ -95,19 +95,22 @@ OFString *date = [[entry modificationDate] localDateStringWithFormat: @"%Y-%m-%d %H:%M:%S"]; [of_stdout writeFormat: @"\tSize: %" PRIu64 @" bytes\n" - @"\tModification date: %@\n", - [entry size], date]; + @"\tMode: %06o\n", + [entry size], [entry mode]]; if ([entry owner] != nil) [of_stdout writeFormat: @"\tOwner: %@\n", [entry owner]]; if ([entry group] != nil) [of_stdout writeFormat: @"\tGroup: %@\n", [entry group]]; + + [of_stdout writeFormat: @"\tModification date: %@\n", + date]; } if (app->_outputLevel >= 2) { switch ([entry type]) { case OF_TAR_ARCHIVE_ENTRY_TYPE_FILE: