summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2010-02-19 01:31:42 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2010-02-19 01:31:42 -0800
commit50c19c777d7b219914b4149e9a465542e3cb5700 (patch)
tree8f324bd06f6c515dd28888a2e619917e3bcc2513 /dir.c
parentMerge branch 'maint' (diff)
parentMerge branch 'jk/maint-rmdir-fix' into maint (diff)
downloadtgif-50c19c777d7b219914b4149e9a465542e3cb5700.tar.xz
Merge branch 'maint'
* maint: rm: fix bug in recursive subdirectory removal Documentation: describe --thin more accurately
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 67c3af6a1a..133c333df6 100644
--- a/dir.c
+++ b/dir.c
@@ -1044,7 +1044,7 @@ int remove_path(const char *name)
slash = dirs + (slash - name);
do {
*slash = '\0';
- } while (rmdir(dirs) && (slash = strrchr(dirs, '/')));
+ } while (rmdir(dirs) == 0 && (slash = strrchr(dirs, '/')));
free(dirs);
}
return 0;