diff --git a/File.cpp b/File.cpp index b6aa4f6..58a326c 100644 --- a/File.cpp +++ b/File.cpp @@ -184,8 +184,11 @@ VolumeEntry::VolumeEntry(const void *data) // 0x14--0x1b reserved - //creation = timeToUnix(load16(&cp[0x18]), load16(&cp[0x1a])); + creation = timeToUnix(load16(&cp[0x18]), load16(&cp[0x1a])); + last_mod = timeToUnix(load16(&cp[0x12]), load16(&cp[0x14])); + if (last_mod == 0) last_mod = creation; + //version = cp[0x1c]; //min_version = cp[0x1d]; diff --git a/File.h b/File.h index 4923764..c69d22e 100644 --- a/File.h +++ b/File.h @@ -106,6 +106,7 @@ public: unsigned name_length; char volume_name[15+1]; time_t creation; + time_t last_mod; //unsigned version; //unsigned min_version; unsigned access; diff --git a/profuse_stat.cpp b/profuse_stat.cpp index 6a82521..1e8a6f3 100644 --- a/profuse_stat.cpp +++ b/profuse_stat.cpp @@ -89,8 +89,8 @@ int prodos_stat(const VolumeEntry &v, struct stat *st) #ifdef HAVE_STAT_BIRTHTIME st->st_birthtime = v.creation; #endif - st->st_mtime = v.creation; - st->st_atime = v.creation; + st->st_mtime = v.last_mod; + st->st_atime = v.last_mod; st->st_nlink = v.file_count + 1; st->st_size = BLOCK_SIZE;