Discussion:
[PATCH] config: Handle IN_MOVED_TO inotify event
Tomasz Bursztyka
2014-10-21 11:44:05 UTC
Permalink
On some (weird) systems, /tmp might be on the same exact fs as /var,
leading to a mv command raising IN_MOVED_FROM/IN_MOVE_TO inotify events
and not IN_DELETE/IN_CREATE.
---
src/config.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/config.c b/src/config.c
index 93a788a..e7d1671 100644
--- a/src/config.c
+++ b/src/config.c
@@ -891,7 +891,7 @@ static void config_notify_handler(struct inotify_event *event,
return;
}

- if (event->mask & IN_CREATE)
+ if (event->mask & IN_CREATE || event->mask & IN_MOVED_TO)
create_config(ident);

if (event->mask & IN_MODIFY) {
--
1.8.5.5
Loading...