#7120: Tracker and Terminal show the wrong file dates on NTFS volume --------------------------------+------------------------------ Reporter: Disreali | Owner: 3dEyes Type: bug | Status: new Priority: normal | Milestone: R1 Component: File Systems/NTFS | Version: R1/Development Resolution: | Keywords: Blocked By: | Has a Patch: 0 Platform: All | Blocking: --------------------------------+------------------------------ Comment (by korli): The obvious bug is at the following lines in src/add- ons/kernel/file_systems/ntfs/fs_func.c in fs_rstat(): {{{ stbuf->st_atime = ni->last_access_time; stbuf->st_ctime = ni->last_mft_change_time; stbuf->st_mtime = ni->last_data_change_time; }}} st_atime, st_ctime, st_mtime are actually time_t {{{ #define st_atime st_atim.tv_sec #define st_mtime st_mtim.tv_sec #define st_ctime st_ctim.tv_sec }}} The code should look like the following, unless I miss something. ntfs2timespec is available in ntfstime.h. {{{ stbuf->st_atim = ntfs2timespec(ni->last_access_time); stbuf->st_mtim = ntfs2timespec(ni->last_data_change_time); stbuf->st_ctim = ntfs2timespec(ni->last_mft_change_time); }}} -- Ticket URL: <http://dev.haiku-os.org/ticket/7120#comment:5> Haiku <http://dev.haiku-os.org> Haiku - the operating system.