summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/condition.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/condition.c b/src/condition.c
index f84c81bd81..1438ea85a0 100644
--- a/src/condition.c
+++ b/src/condition.c
@@ -163,7 +163,7 @@ bool condition_test(Condition *c) {
struct stat st;
if (stat(c->parameter, &st) < 0)
- return !c->negate;
+ return c->negate;
return S_ISDIR(st.st_mode) == !c->negate;
}
@@ -171,7 +171,7 @@ bool condition_test(Condition *c) {
struct stat st;
if (lstat(c->parameter, &st) < 0)
- return !c->negate;
+ return c->negate;
return S_ISLNK(st.st_mode) == !c->negate;
}
@@ -189,7 +189,7 @@ bool condition_test(Condition *c) {
struct stat st;
if (stat(c->parameter, &st) < 0)
- return !c->negate;
+ return c->negate;
return (S_ISREG(st.st_mode) && (st.st_mode & 0111)) == !c->negate;
}