From edf94db8df8c84c672ab281257d8da7798ca293e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Janouch?= Date: Tue, 23 Oct 2018 05:24:56 +0200 Subject: [PATCH] Limit inotify to visible events --- sdn.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sdn.cpp b/sdn.cpp index 75624ad..e1063c5 100644 --- a/sdn.cpp +++ b/sdn.cpp @@ -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) {