summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-04-06 10:05:19 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:00:20 -0500
commit4abf299e0cd238d80ebe8b31eb0a4388499da404 (patch)
treeae6636f86439fbedca95b12251744bcb37868dc3
parent115acb5dd0bcd3a4b52c3a02302e8c250715bb44 (diff)
downloadsamba-4abf299e0cd238d80ebe8b31eb0a4388499da404.tar.gz
samba-4abf299e0cd238d80ebe8b31eb0a4388499da404.tar.bz2
samba-4abf299e0cd238d80ebe8b31eb0a4388499da404.zip
r14941: a rename of a file (but not a directory) triggers 3 events. The first
two are the rename (FROM and TO) then the 3rd event is a modify event of both attributes and creation time. (This used to be commit 010a1b14a58c0194e1f8bba29f4d02a86b7559c5)
-rw-r--r--source4/ntvfs/posix/pvfs_rename.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/source4/ntvfs/posix/pvfs_rename.c b/source4/ntvfs/posix/pvfs_rename.c
index c3442884cf..6a397ef981 100644
--- a/source4/ntvfs/posix/pvfs_rename.c
+++ b/source4/ntvfs/posix/pvfs_rename.c
@@ -41,7 +41,7 @@ NTSTATUS pvfs_do_rename(struct pvfs_state *pvfs, const struct pvfs_filename *nam
if (name1->dos.attrib & FILE_ATTRIBUTE_DIRECTORY) {
mask = FILE_NOTIFY_CHANGE_DIR_NAME;
} else {
- mask = FILE_NOTIFY_CHANGE_FILE_NAME|FILE_NOTIFY_CHANGE_ATTRIBUTES|FILE_NOTIFY_CHANGE_CREATION;
+ mask = FILE_NOTIFY_CHANGE_FILE_NAME;
}
/*
renames to the same directory cause a OLD_NAME->NEW_NAME notify.
@@ -70,6 +70,16 @@ NTSTATUS pvfs_do_rename(struct pvfs_state *pvfs, const struct pvfs_filename *nam
mask,
name2);
}
+
+ /* this is a strange one. w2k3 gives an additional event for CHANGE_ATTRIBUTES
+ and CHANGE_CREATION on the new file when renming files, but not
+ directories */
+ if ((name1->dos.attrib & FILE_ATTRIBUTE_DIRECTORY) == 0) {
+ notify_trigger(pvfs->notify_context,
+ NOTIFY_ACTION_MODIFIED,
+ FILE_NOTIFY_CHANGE_ATTRIBUTES|FILE_NOTIFY_CHANGE_CREATION,
+ name2);
+ }
return NT_STATUS_OK;
}