aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/clean.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/clean.c')
-rw-r--r--builtin/clean.c4
1 files changed, 3 insertions, 1 deletions
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);