From 4311e9455f8e7a811b7614a725a35031dc35581b Mon Sep 17 00:00:00 2001 From: INSUN PYO Date: Mon, 18 May 2020 18:21:13 +0900 Subject: [PATCH] Revert "core/path: fix spurious triggering of PathExists= on restart/reload" This reverts commit d7cf8c24d4ef6ed4c9d711ee82ba57a529baad34. Change-Id: Ice828460a04862ad41495826566c0be1485bce63 --- src/core/path.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/core/path.c b/src/core/path.c index ca15ca8..0e105aa 100644 --- a/src/core/path.c +++ b/src/core/path.c @@ -175,14 +175,12 @@ int path_spec_fd_event(PathSpec *s, uint32_t revents) { } static bool path_spec_check_good(PathSpec *s, bool initial) { - bool b, good = false; + bool good = false; switch (s->type) { case PATH_EXISTS: - b = access(s->path, F_OK) >= 0; - good = b && !s->previous_exists; - s->previous_exists = b; + good = access(s->path, F_OK) >= 0; break; case PATH_EXISTS_GLOB: @@ -198,11 +196,14 @@ static bool path_spec_check_good(PathSpec *s, bool initial) { } case PATH_CHANGED: - case PATH_MODIFIED: + case PATH_MODIFIED: { + bool b; + b = access(s->path, F_OK) >= 0; good = !initial && b != s->previous_exists; s->previous_exists = b; break; + } default: ; -- 2.7.4