diff --git a/src/ntfs-3g.c b/src/ntfs-3g.c index 04733394..3c4ac837 100644 --- a/src/ntfs-3g.c +++ b/src/ntfs-3g.c @@ -1188,6 +1188,7 @@ static int ntfs_fuse_rmdir(const char *path) static int ntfs_fuse_utime(const char *path, struct utimbuf *buf) { ntfs_inode *ni; + time_t now; int res = 0; if (ntfs_fuse_is_named_data_stream(path)) @@ -1198,17 +1199,15 @@ static int ntfs_fuse_utime(const char *path, struct utimbuf *buf) NInoSetNoParentMtimeUpdate(ni); + now = time(NULL); + ni->last_mft_change_time = now; + if (buf) { ni->last_access_time = buf->actime; ni->last_data_change_time = buf->modtime; - ni->last_mft_change_time = buf->modtime; } else { - time_t now; - - now = time(NULL); ni->last_access_time = now; ni->last_data_change_time = now; - ni->last_mft_change_time = now; } NInoFileNameSetDirty(ni); NInoSetDirty(ni);