summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-04-27 11:36:41 -0700
committerJunio C Hamano <gitster@pobox.com>2011-04-27 11:36:41 -0700
commit1de0746d849c64e1f4d160f9915d87d39c0794ea (patch)
tree9b85bfacac5e7098856808a25da0b5511ba66fd6 /dir.c
parent385185403e74f3b4b52c33bb263ca735c512f66f (diff)
parent0235017eafa8dfc3a7353b7091ad5109d0beb7a5 (diff)
downloadgit-1de0746d849c64e1f4d160f9915d87d39c0794ea.tar.gz
Merge branch 'ar/clean-rmdir-empty'
* ar/clean-rmdir-empty: clean: unreadable directory may still be rmdir-able if it is empty
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dir.c b/dir.c
index 325fb56ad3..532bcb65b5 100644
--- a/dir.c
+++ b/dir.c
@@ -1192,7 +1192,7 @@ int remove_dir_recursively(struct strbuf *path, int flag)
dir = opendir(path->buf);
if (!dir)
- return -1;
+ return rmdir(path->buf);
if (path->buf[original_len - 1] != '/')
strbuf_addch(path, '/');