summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-11-15 00:47:29 +0100
committerLennart Poettering <lennart@poettering.net>2010-11-15 00:47:29 +0100
commit782195a3c31a79428874a32e0264c0aa97a664f7 (patch)
treeefde603945976cf13498f2dbe9af8e90be71b7b9 /src
parent6210e7fc31e14159627144f7409eadd3ce0d72b9 (diff)
path: always look for IN_ATTRIB since deletion is signalled that way
Diffstat (limited to 'src')
-rw-r--r--src/path.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/path.c b/src/path.c
index f62157e801..3e28569203 100644
--- a/src/path.c
+++ b/src/path.c
@@ -181,9 +181,9 @@ static void path_unwatch_one(Path *p, PathSpec *s) {
static int path_watch_one(Path *p, PathSpec *s) {
static const int flags_table[_PATH_TYPE_MAX] = {
- [PATH_EXISTS] = IN_DELETE_SELF|IN_MOVE_SELF,
+ [PATH_EXISTS] = IN_DELETE_SELF|IN_MOVE_SELF|IN_ATTRIB,
[PATH_CHANGED] = IN_DELETE_SELF|IN_MOVE_SELF|IN_ATTRIB|IN_CLOSE_WRITE|IN_CREATE|IN_DELETE|IN_MOVED_FROM|IN_MOVED_TO,
- [PATH_DIRECTORY_NOT_EMPTY] = IN_DELETE_SELF|IN_MOVE_SELF|IN_CREATE|IN_MOVED_TO
+ [PATH_DIRECTORY_NOT_EMPTY] = IN_DELETE_SELF|IN_MOVE_SELF|IN_ATTRIB|IN_CREATE|IN_MOVED_TO
};
bool exists = false;
@@ -221,9 +221,9 @@ static int path_watch_one(Path *p, PathSpec *s) {
*slash = 0;
- flags = IN_DELETE_SELF|IN_MOVE_SELF;
+ flags = IN_DELETE_SELF|IN_MOVE_SELF|IN_ATTRIB;
if (!exists)
- flags |= IN_CREATE | IN_MOVED_TO | IN_ATTRIB;
+ flags |= IN_CREATE | IN_MOVED_TO;
if (inotify_add_watch(s->inotify_fd, k, flags) >= 0)
exists = true;