@@ -58,26 +58,12 @@ } static void setModificationDate(OFString *path, OFLHAArchiveEntry *entry) { - OFDate *modificationDate = entry.modificationDate; - OFFileAttributes attributes; - - if (modificationDate == nil) { - /* - * Fall back to the original date if we have no modification - * date, as the modification date is a UNIX extension. - */ - modificationDate = entry.date; - - if (modificationDate == nil) - return; - } - - attributes = [OFDictionary - dictionaryWithObject: modificationDate + OFFileAttributes attributes = [OFDictionary + dictionaryWithObject: entry.modificationDate forKey: OFFileModificationDate]; [[OFFileManager defaultManager] setAttributes: attributes ofItemAtPath: path]; } @@ -132,11 +118,11 @@ void *pool = objc_autoreleasePoolPush(); [OFStdOut writeLine: entry.fileName]; if (app->_outputLevel >= 1) { - OFString *date = [entry.date + OFString *modificationDate = [entry.modificationDate localDateStringWithFormat: @"%Y-%m-%d %H:%M:%S"]; OFString *compressedSize = [OFString stringWithFormat: @"%" PRIu32, entry.compressedSize]; OFString *uncompressedSize = [OFString stringWithFormat: @"%" PRIu32, entry.uncompressedSize]; @@ -173,13 +159,14 @@ [OFStdOut writeString: @"\t"]; [OFStdOut writeLine: OF_LOCALIZED(@"list_crc16", @"CRC16: %[crc16]", @"crc16", CRC16)]; [OFStdOut writeString: @"\t"]; - [OFStdOut writeLine: OF_LOCALIZED(@"list_date", - @"Date: %[date]", - @"date", date)]; + [OFStdOut writeLine: OF_LOCALIZED( + @"list_modification_date", + @"Modification date: %[date]", + @"date", modificationDate)]; if (entry.mode != nil) { OFString *modeString = [OFString stringWithFormat: @"%ho", entry.mode.unsignedShortValue]; @@ -237,21 +224,10 @@ @"list_osid", @"Operating system identifier: " "%[osid]", @"osid", OSID)]; } - - if (entry.modificationDate != nil) { - OFString *modificationDate = - entry.modificationDate.description; - - [OFStdOut writeString: @"\t"]; - [OFStdOut writeLine: OF_LOCALIZED( - @"list_modification_date", - @"Modification date: %[date]", - @"date", modificationDate)]; - } } if (app->_outputLevel >= 3) { OFString *extensions = indent(entry.extensions.description); @@ -469,11 +445,11 @@ #ifdef OF_FILE_MANAGER_SUPPORTS_PERMISSIONS entry.mode = [OFNumber numberWithUnsignedLong: attributes.filePOSIXPermissions]; #endif - entry.date = attributes.fileModificationDate; + entry.modificationDate = attributes.fileModificationDate; #ifdef OF_FILE_MANAGER_SUPPORTS_OWNER entry.UID = [OFNumber numberWithUnsignedLong: attributes.fileOwnerAccountID]; entry.GID = [OFNumber numberWithUnsignedLong: