diff options
Diffstat (limited to 'src/condition.c')
-rw-r--r-- | src/condition.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/condition.c b/src/condition.c index 4bbd4dbafa..21da2eb9e9 100644 --- a/src/condition.c +++ b/src/condition.c @@ -106,6 +106,13 @@ bool condition_test(Condition *c) { case CONDITION_PATH_EXISTS: return (access(c->parameter, F_OK) >= 0) == !c->negate; + case CONDITION_DIRECTORY_NOT_EMPTY: { + int k; + + k = dir_is_empty(c->parameter); + return !(k == -ENOENT || k > 0) == !c->negate; + } + case CONDITION_KERNEL_COMMAND_LINE: return !!test_kernel_command_line(c->parameter) == !c->negate; |