Mercurial > dovecot > core-2.2
changeset 18977:412de6dea139
lib: kqueue notification should trigger also on file renames.
For example if dovecot.index.log is renamed to dovecot.index.log.2, we
should notice that since there's now a new dovecot.index.log containing new
changes.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 19 Aug 2015 13:41:54 +0300 |
parents | 3a8af59b379d |
children | ff9a9ffcd2af |
files | src/lib/ioloop-notify-kqueue.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib/ioloop-notify-kqueue.c Wed Aug 19 13:40:35 2015 +0300 +++ b/src/lib/ioloop-notify-kqueue.c Wed Aug 19 13:41:54 2015 +0300 @@ -138,7 +138,8 @@ event state transitions and not the current state. With this flag, the same event is only returned once. */ MY_EV_SET(&ev, fd, EVFILT_VNODE, EV_ADD | EV_CLEAR, - NOTE_DELETE | NOTE_WRITE | NOTE_EXTEND | NOTE_REVOKE, 0, io); + NOTE_DELETE | NOTE_RENAME | NOTE_WRITE | NOTE_EXTEND | + NOTE_REVOKE, 0, io); if (kevent(ctx->kq, &ev, 1, NULL, 0, NULL) < 0) { i_error("kevent(%d, %s) for notify failed: %m", fd, path); i_close_fd(&fd);