diff options
Diffstat (limited to 'source3/smbd/notify_inotify.c')
-rw-r--r-- | source3/smbd/notify_inotify.c | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/source3/smbd/notify_inotify.c b/source3/smbd/notify_inotify.c index 944f27a155..8f4712404f 100644 --- a/source3/smbd/notify_inotify.c +++ b/source3/smbd/notify_inotify.c @@ -168,23 +168,25 @@ static void inotify_dispatch(struct inotify_private *in, } } - /* SMB expects a file rename to generate three events, two for - the rename and the other for a modify of the - destination. Strange! */ - if (ne.action != NOTIFY_ACTION_NEW_NAME || - (e->mask & IN_ISDIR) != 0) { - return; - } + if ((ne.action == NOTIFY_ACTION_NEW_NAME) && + ((e->mask & IN_ISDIR) == 0)) { - ne.action = NOTIFY_ACTION_MODIFIED; - e->mask = IN_ATTRIB; + /* + * SMB expects a file rename to generate three events, two for + * the rename and the other for a modify of the + * destination. Strange! + */ - for (w=in->watches;w;w=next) { - next = w->next; - if (w->wd == e->wd && filter_match(w, e) && - !(w->filter & FILE_NOTIFY_CHANGE_CREATION)) { - ne.dir = w->path; - w->callback(in->ctx, w->private_data, &ne); + ne.action = NOTIFY_ACTION_MODIFIED; + e->mask = IN_ATTRIB; + + for (w=in->watches;w;w=next) { + next = w->next; + if (w->wd == e->wd && filter_match(w, e) && + !(w->filter & FILE_NOTIFY_CHANGE_CREATION)) { + ne.dir = w->path; + w->callback(in->ctx, w->private_data, &ne); + } } } } |