mirror of
https://github.com/samba-team/samba.git
synced 2025-02-05 21:57:51 +03:00
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 commit is contained in:
parent
03906b2b13
commit
010a1b14a5
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user