summaryrefslogtreecommitdiff
path: root/src/path.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-11-15 20:06:49 +0100
committerLennart Poettering <lennart@poettering.net>2010-11-15 22:13:25 +0100
commit36af55d99711e9accdf42d8a7df60e069f4086c0 (patch)
tree789d2d3d0c8e677be15f142b0c72ffab72e73f3b /src/path.c
parent5c273f855630bf54f6ebe95ea8b45c8abe2ffff6 (diff)
unit: introduce ConditionDirectoryNotEmpty=
Diffstat (limited to 'src/path.c')
-rw-r--r--src/path.c8
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;