diff options
Diffstat (limited to 'libarchive')
-rw-r--r-- | libarchive/archive_entry_copy_bhfi.c | 1 | ||||
-rw-r--r-- | libarchive/archive_read_disk_windows.c | 1 | ||||
-rw-r--r-- | libarchive/archive_read_support_format_lha.c | 9 |
3 files changed, 8 insertions, 3 deletions
diff --git a/libarchive/archive_entry_copy_bhfi.c b/libarchive/archive_entry_copy_bhfi.c index 8339032c..c6f9e68b 100644 --- a/libarchive/archive_entry_copy_bhfi.c +++ b/libarchive/archive_entry_copy_bhfi.c @@ -63,6 +63,7 @@ archive_entry_copy_bhfi(struct archive_entry *entry, archive_entry_set_mtime(entry, secs, nsecs); fileTimeToUtc(&bhfi->ftCreationTime, &secs, &nsecs); archive_entry_set_birthtime(entry, secs, nsecs); + archive_entry_set_ctime(entry, secs, nsecs); archive_entry_set_dev(entry, bhfi->dwVolumeSerialNumber); archive_entry_set_ino64(entry, (((int64_t)bhfi->nFileIndexHigh) << 32) + bhfi->nFileIndexLow); diff --git a/libarchive/archive_read_disk_windows.c b/libarchive/archive_read_disk_windows.c index 251b3d44..30218d95 100644 --- a/libarchive/archive_read_disk_windows.c +++ b/libarchive/archive_read_disk_windows.c @@ -1597,6 +1597,7 @@ tree_archive_entry_copy_bhfi(struct archive_entry *entry, struct tree *t, archive_entry_set_mtime(entry, secs, nsecs); fileTimeToUtc(&bhfi->ftCreationTime, &secs, &nsecs); archive_entry_set_birthtime(entry, secs, nsecs); + archive_entry_set_ctime(entry, secs, nsecs); archive_entry_set_dev(entry, bhfi_dev(bhfi)); archive_entry_set_ino64(entry, bhfi_ino(bhfi)); if (bhfi->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) diff --git a/libarchive/archive_read_support_format_lha.c b/libarchive/archive_read_support_format_lha.c index f60081b2..feaccc07 100644 --- a/libarchive/archive_read_support_format_lha.c +++ b/libarchive/archive_read_support_format_lha.c @@ -621,13 +621,16 @@ archive_read_format_lha_read_header(struct archive_read *a, archive_entry_set_uname(entry, lha->uname.s); if (archive_strlen(&lha->gname) > 0) archive_entry_set_gname(entry, lha->gname.s); - if (lha->setflag & BIRTHTIME_IS_SET) + if (lha->setflag & BIRTHTIME_IS_SET) { archive_entry_set_birthtime(entry, lha->birthtime, lha->birthtime_tv_nsec); - else + archive_entry_set_ctime(entry, lha->birthtime, + lha->birthtime_tv_nsec); + } else { archive_entry_unset_birthtime(entry); + archive_entry_unset_ctime(entry); + } archive_entry_set_mtime(entry, lha->mtime, lha->mtime_tv_nsec); - archive_entry_unset_ctime(entry); if (lha->setflag & ATIME_IS_SET) archive_entry_set_atime(entry, lha->atime, lha->atime_tv_nsec); |