1 Star 0 Fork 94

Mingtai/systemd

forked from src-openEuler/systemd 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-fix-DirectoryNotEmpty-when-it-comes-to-a-Non-directo.patch 937 Bytes
一键复制 编辑 原始数据 按行查看 历史
From 0fdcae09c44486e30e4fe0469606c02d034577be Mon Sep 17 00:00:00 2001
From: yangmingtai <961612727@qq.com>
Date: Mon, 6 Dec 2021 17:06:13 +0800
Subject: [PATCH] fix DirectoryNotEmpty when it comes to a Non-directory file
(cherry picked from commit 5896a9ebdbe4d38c01390d0a5e82f9fcb4971059)
Conflict:NA
Reference:https://github.com/systemd/systemd/commit/0fdcae09c44486e30e4fe0469606c02d034577be
---
src/core/path.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/core/path.c b/src/core/path.c
index e098e83a31..684e17f433 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;
}
--
2.33.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yangmingtaip/systemd.git
git@gitee.com:yangmingtaip/systemd.git
yangmingtaip
systemd
systemd
master

搜索帮助

D67c1975 1850385 1daf7b77 1850385