summaryrefslogtreecommitdiff
path: root/source3/modules/vfs_default.c
diff options
context:
space:
mode:
authorAlexander Bokovoy <ab@samba.org>2009-08-08 08:07:24 +0300
committerAlexander Bokovoy <ab@samba.org>2009-08-08 08:07:24 +0300
commit8eac1896299d820fec0fd92b2b8b6a058ae39642 (patch)
treef97b0a2c21eb4f91aa51cb2af4381287c3525727 /source3/modules/vfs_default.c
parent217e3086c74eb0b46fab512b5887d9a5a5b7ee9a (diff)
parentd296c774c5981baa863c697782dba1b6280d632e (diff)
downloadsamba-8eac1896299d820fec0fd92b2b8b6a058ae39642.tar.gz
samba-8eac1896299d820fec0fd92b2b8b6a058ae39642.tar.bz2
samba-8eac1896299d820fec0fd92b2b8b6a058ae39642.zip
Merge branch 'master' of ssh://git.samba.org/data/git/samba
Diffstat (limited to 'source3/modules/vfs_default.c')
-rw-r--r--source3/modules/vfs_default.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index a4922e7e05..2ee2fd1249 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -780,6 +780,21 @@ static int vfswrap_ntimes(vfs_handle_struct *handle,
goto out;
}
+ if (null_timespec(ft->atime)) {
+ ft->atime= smb_fname->st.st_ex_atime;
+ }
+
+ if (null_timespec(ft->mtime)) {
+ ft->mtime = smb_fname->st.st_ex_mtime;
+ }
+
+ if ((timespec_compare(&ft->atime,
+ &smb_fname->st.st_ex_atime) == 0) &&
+ (timespec_compare(&ft->mtime,
+ &smb_fname->st.st_ex_mtime) == 0)) {
+ return 0;
+ }
+
#if defined(HAVE_UTIMES)
if (ft != NULL) {
struct timeval tv[2];