Limit inotify to visible events

This commit is contained in:
Přemysl Eric Janouch 2018-10-23 05:24:56 +02:00
parent 70e391eed0
commit edf94db8df
Signed by: p
GPG Key ID: A0420B94F92B9493
1 changed files with 2 additions and 1 deletions

View File

@ -495,8 +495,9 @@ fun reload () {
if (g.inotify_wd != -1)
inotify_rm_watch (g.inotify_fd, g.inotify_wd);
// We don't show atime, so access and open are merely spam
g.inotify_wd = inotify_add_watch (g.inotify_fd, buf,
IN_ALL_EVENTS | IN_ONLYDIR);
(IN_ALL_EVENTS | IN_ONLYDIR | IN_EXCL_UNLINK) & ~(IN_ACCESS | IN_OPEN));
}
fun search (const wstring &needle) {