summaryrefslogtreecommitdiff
path: root/entry.c
diff options
context:
space:
mode:
Diffstat (limited to 'entry.c')
-rw-r--r--entry.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/entry.c b/entry.c
index e3d3add300..7b9f43716f 100644
--- a/entry.c
+++ b/entry.c
@@ -56,9 +56,12 @@ static void remove_subtree(struct strbuf *path)
if (!dir)
die_errno("cannot opendir '%s'", path->buf);
- while ((de = readdir_skip_dot_and_dotdot(dir)) != NULL) {
+ while ((de = readdir(dir)) != NULL) {
struct stat st;
+ if (is_dot_or_dotdot(de->d_name))
+ continue;
+
strbuf_addch(path, '/');
strbuf_addstr(path, de->d_name);
if (lstat(path->buf, &st))