From: yangmingtai <961612727@qq.com> Date: Mon, 6 Dec 2021 09:06:13 +0000 (+0800) Subject: fix DirectoryNotEmpty when it comes to a Non-directory file X-Git-Tag: v250-rc1~61 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5896a9ebdbe4d38c01390d0a5e82f9fcb4971059;p=thirdparty%2Fsystemd.git fix DirectoryNotEmpty when it comes to a Non-directory file --- diff --git a/src/core/path.c b/src/core/path.c index 29ec66fd4db..bcd922901b7 100644 --- a/src/core/path.c +++ b/src/core/path.c @@ -215,7 +215,7 @@ static bool path_spec_check_good(PathSpec *s, bool initial, bool from_trigger_no int k; k = dir_is_empty(s->path); - good = !(k == -ENOENT || k > 0); + good = !(IN_SET(k, -ENOENT, -ENOTDIR) || k > 0); break; }