diff options
Diffstat (limited to 'src/path.c')
-rw-r--r-- | src/path.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/path.c b/src/path.c index f4a0a288bb..a8b1072449 100644 --- a/src/path.c +++ b/src/path.c @@ -355,9 +355,13 @@ static void path_enter_waiting(Path *p, bool initial, bool recheck) { good = access(s->path, F_OK) >= 0; break; - case PATH_DIRECTORY_NOT_EMPTY: - good = dir_is_empty(s->path) == 0; + case PATH_DIRECTORY_NOT_EMPTY: { + int k; + + k = dir_is_empty(s->path); + good = !(k == -ENOENT || k > 0); break; + } case PATH_CHANGED: { bool b; |