]> git.ipfire.org Git - thirdparty/git.git/blobdiff - dir.c
Merge branch 'jk/maint-rmdir-fix' into maint-1.6.6
[thirdparty/git.git] / dir.c
diff --git a/dir.c b/dir.c
index d0999ba055367c31571b251fb34bb46ed6c7051d..5d0a3084dbe1e7a23f7863f6c206914fbbfc0bf6 100644 (file)
--- a/dir.c
+++ b/dir.c
@@ -933,7 +933,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;