summaryrefslogtreecommitdiff
path: root/src/fileops.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fileops.c')
-rw-r--r--src/fileops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fileops.c b/src/fileops.c
index bf95f769c..2c3192c92 100644
--- a/src/fileops.c
+++ b/src/fileops.c
@@ -309,7 +309,7 @@ static int _rmdir_recurs_foreach(void *opaque, git_buf *path)
return -1;
if (p_rmdir(path->ptr) < 0) {
- if (removal_type == GIT_DIRREMOVAL_ONLY_EMPTY_DIRS && errno == ENOTEMPTY)
+ if (removal_type == GIT_DIRREMOVAL_ONLY_EMPTY_DIRS && (errno == ENOTEMPTY || errno == EEXIST))
return 0;
giterr_set(GITERR_OS, "Could not remove directory '%s'", path->ptr);