From cfab9d64c69ac3d5e1ffef856362d87a7ded7d6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Pierre=20Andr=C3=A9?= Date: Tue, 11 Mar 2014 11:03:06 +0100 Subject: [PATCH] Fixed checking whether utimensat() applies to current atime The check was applied to mtime instead of atime --- src/ntfs-3g.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ntfs-3g.c b/src/ntfs-3g.c index be2a819b..baccbfdc 100644 --- a/src/ntfs-3g.c +++ b/src/ntfs-3g.c @@ -2291,7 +2291,7 @@ static int ntfs_fuse_utimens(const char *path, const struct timespec tv[2]) #if !KERNELPERMS | (POSIXACLS & !KERNELACLS) if (ntfs_allowed_as_owner(&security, ni) || ((tv[0].tv_nsec == UTIME_NOW) - && (tv[0].tv_nsec == UTIME_NOW) + && (tv[1].tv_nsec == UTIME_NOW) && ntfs_allowed_access(&security, ni, S_IWRITE))) { #endif ntfs_time_update_flags mask = NTFS_UPDATE_CTIME;