From 1df046bcff6085f3800088c51e344594f822df57 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Thu, 27 May 2021 13:59:39 +0900 Subject: Revert "dir: introduce readdir_skip_dot_and_dotdot() helper" This reverts commit b548f0f1568f6b01e55ca69c24d3cb19489f92aa, to be replaced with a reworked version. --- builtin/clean.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'builtin/clean.c') diff --git a/builtin/clean.c b/builtin/clean.c index a1a5747615..995053b791 100644 --- a/builtin/clean.c +++ b/builtin/clean.c @@ -189,8 +189,10 @@ static int remove_dirs(struct strbuf *path, const char *prefix, int force_flag, strbuf_complete(path, '/'); len = path->len; - while ((e = readdir_skip_dot_and_dotdot(dir)) != NULL) { + while ((e = readdir(dir)) != NULL) { struct stat st; + if (is_dot_or_dotdot(e->d_name)) + continue; strbuf_setlen(path, len); strbuf_addstr(path, e->d_name); -- cgit v1.2.3