summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-03-04 00:22:00 +0100
committerLennart Poettering <lennart@poettering.net>2011-03-04 00:22:00 +0100
commit3fc546f93d92c09188d5018ea47def33b149c2e9 (patch)
treed99dcc202427a640310640dbadf92caf03824165 /src
parent430c18ed7f576fd9041b0a02e7c4210bdd020a25 (diff)
path: don't use IN_ATTRIB on parent dirs when watching a file, since those cannot be removed without emptying the dir first anyway and we need IN_ATTRIB only to detect the link count dropping to 0
Diffstat (limited to 'src')
-rw-r--r--src/path.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/path.c b/src/path.c
index bd40ab6f99..1455b47995 100644
--- a/src/path.c
+++ b/src/path.c
@@ -223,9 +223,9 @@ static int path_watch_one(Path *p, PathSpec *s) {
/* Trim the path at the last slash. Keep the slash if it's the root dir. */
slash[slash == k] = 0;
- flags = IN_DELETE_SELF|IN_MOVE_SELF|IN_ATTRIB;
+ flags = IN_MOVE_SELF;
if (!exists)
- flags |= IN_CREATE | IN_MOVED_TO;
+ flags |= IN_DELETE_SELF | IN_ATTRIB | IN_CREATE | IN_MOVED_TO;
if (inotify_add_watch(s->inotify_fd, k, flags) >= 0)
exists = true;