projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0e1e2ac
)
fix ConditionDirectoryNotEmpty when it comes to a Non-directory file
author
jiangchuangang
<jiangchuangang@huawei.com>
Mon, 29 Nov 2021 14:30:37 +0000
(22:30 +0800)
committer
Zbigniew Jędrzejewski-Szmek
<zbyszek@in.waw.pl>
Thu, 13 Jan 2022 09:59:07 +0000
(10:59 +0100)
(cherry picked from commit
193105f2d0408e2d96265935174b3cf0f100ef2e
)
(cherry picked from commit
10fc8b7775a8cfd9519a1c6628d813b1aa315a33
)
src/shared/condition.c
patch
|
blob
|
history
diff --git
a/src/shared/condition.c
b/src/shared/condition.c
index 766b87610d56534c01f1d0d6a98745cd33f1e986..9eab38b02719db40c7f6ceab7596ef2402b4d831 100644
(file)
--- a/
src/shared/condition.c
+++ b/
src/shared/condition.c
@@
-800,7
+800,7
@@
static int condition_test_directory_not_empty(Condition *c, char **env) {
assert(c->type == CONDITION_DIRECTORY_NOT_EMPTY);
r = dir_is_empty(c->parameter);
- return r <= 0 &&
r != -ENOENT
;
+ return r <= 0 &&
!IN_SET(r, -ENOENT, -ENOTDIR)
;
}
static int condition_test_file_not_empty(Condition *c, char **env) {