fix DirectoryNotEmpty when it comes to a Non-directory file

This commit is contained in:
yangmingtai
2021-12-07 01:28:07 +09:00
committed by Yu Watanabe
parent efeecf4010
commit 5896a9ebdb
+1 -1
View File
@@ -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;
}