If a config file is moved from a config directory, IN_DELETE is not
fired but IN_MOVED_FROM is, so both have to be monitored.
---
src/config.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/config.c b/src/config.c
index 5bf5cf1..d993fd3 100644
--- a/src/config.c
+++ b/src/config.c
@@ -900,7 +900,7 @@ static void config_notify_handler(struct inotify_event
*event,
return;
}
- if (event->mask & IN_CREATE || event->mask & IN_MOVED_TO)
+ if (event->mask & (IN_CREATE | IN_MOVED_TO))
create_config(ident);
if (event->mask & IN_MODIFY) {
@@ -925,7 +925,7 @@ static void config_notify_handler(struct inotify_event
*event,
}
}
- if (event->mask & IN_DELETE)
+ if (event->mask & (IN_DELETE | IN_MOVED_FROM))
g_hash_table_remove(config_table, ident);
}
--
2.1.0
_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman