CRT stat() Microsoft provides set 'Creation time' to st_ctime.
It seems we should do that not to confuse applications about ctime.
SVN-Revision: 2938
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);
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)
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);