From d9afd54c5c45f2868da5cecd475bc66c86201502 Mon Sep 17 00:00:00 2001 From: jpandre Date: Thu, 1 Nov 2007 14:17:37 +0000 Subject: [PATCH] Updated mtime after a successful chown/chgrp --- src/ntfs-3g.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/ntfs-3g.c b/src/ntfs-3g.c index e365c469..203a78a0 100644 --- a/src/ntfs-3g.c +++ b/src/ntfs-3g.c @@ -851,6 +851,7 @@ static int ntfs_fuse_chown(const char *path, uid_t uid, gid_t gid) { ntfs_inode *ni; int res; + time_t now; struct SECURITY_CONTEXT security; if (ntfs_fuse_is_named_data_stream(path)) @@ -872,6 +873,13 @@ static int ntfs_fuse_chown(const char *path, uid_t uid, gid_t gid) if (ntfs_set_owner(&security, path,ni,uid,gid)) res = -errno; + else { + if (((int)uid != -1) + || ((int)gid != -1)) { + now = time(NULL); + ni->last_mft_change_time = now; + } + } if (ntfs_inode_close(ni)) set_fuse_error(&res); }