X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=dir.c;h=133c333df61be37e7908f77367f63c85cfc9c548;hb=3e333036ccbb97fddf54bd8fe74b12ba46f1687b;hp=67c3af6a1a91e2acaa873587d6df5318d2fb9ba8;hpb=4ca1b623865a9dc100f95a7867e35a9f73d7507a;p=git.git diff --git a/dir.c b/dir.c index 67c3af6a1..133c333df 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;