summaryrefslogtreecommitdiff
path: root/source4/ntvfs/posix
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-04-06 11:07:21 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:00:21 -0500
commit2b0537143c8e098da5638a6b4f8eeffd1cbef4d2 (patch)
tree5ed464bc7b76e83edad0e7d5c7fc24b158f8ddbe /source4/ntvfs/posix
parent8be91f2d0fa38e0dbc19ce8a6bcb382a989459ab (diff)
downloadsamba-2b0537143c8e098da5638a6b4f8eeffd1cbef4d2.tar.gz
samba-2b0537143c8e098da5638a6b4f8eeffd1cbef4d2.tar.bz2
samba-2b0537143c8e098da5638a6b4f8eeffd1cbef4d2.zip
r14947: add support for file truncate events
(This used to be commit ed1b90407d8ef6e0216931cb3a89cc9a7789ead2)
Diffstat (limited to 'source4/ntvfs/posix')
-rw-r--r--source4/ntvfs/posix/pvfs_setfileinfo.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/source4/ntvfs/posix/pvfs_setfileinfo.c b/source4/ntvfs/posix/pvfs_setfileinfo.c
index b00624c0e9..7661d1eb45 100644
--- a/source4/ntvfs/posix/pvfs_setfileinfo.c
+++ b/source4/ntvfs/posix/pvfs_setfileinfo.c
@@ -400,7 +400,7 @@ NTSTATUS pvfs_setfileinfo(struct ntvfs_module_context *ntvfs,
if (ret == -1) {
return pvfs_map_errno(pvfs, errno);
}
- change_mask |= FILE_NOTIFY_CHANGE_SIZE;
+ change_mask |= FILE_NOTIFY_CHANGE_SIZE | FILE_NOTIFY_CHANGE_ATTRIBUTES;
}
}
@@ -580,6 +580,7 @@ NTSTATUS pvfs_setpathinfo(struct ntvfs_module_context *ntvfs,
} else if (truncate(name->full_name, newstats.st.st_size) == -1) {
return pvfs_map_errno(pvfs, errno);
}
+ change_mask |= FILE_NOTIFY_CHANGE_SIZE | FILE_NOTIFY_CHANGE_ATTRIBUTES;
}
/* possibly change the file timestamps */
@@ -613,10 +614,12 @@ NTSTATUS pvfs_setpathinfo(struct ntvfs_module_context *ntvfs,
*name = newstats;
- notify_trigger(pvfs->notify_context,
- NOTIFY_ACTION_MODIFIED,
- change_mask,
- name->full_name);
+ if (change_mask != 0) {
+ notify_trigger(pvfs->notify_context,
+ NOTIFY_ACTION_MODIFIED,
+ change_mask,
+ name->full_name);
+ }
return pvfs_dosattrib_save(pvfs, name, -1);
}