X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=prune-packed.c;h=26123f7f6bb8bf9cc7fc27905fe2b67d66646f05;hb=c17fb6ee074cb0c9d71e5de42e2ad00786fedc18;hp=73f0f3a46277e9053d97590f8e2200477fe247e3;hpb=29504118f8528f658fd0bfc02d8d78d4c01dc2cc;p=git.git diff --git a/prune-packed.c b/prune-packed.c index 73f0f3a4..26123f7f 100644 --- a/prune-packed.c +++ b/prune-packed.c @@ -27,8 +27,7 @@ static void prune_dir(int i, DIR *dir, char *pathname, int len) error("unable to unlink %s", pathname); } pathname[len] = 0; - if (rmdir(pathname)) - mkdir(pathname, 0777); + rmdir(pathname); } static void prune_packed_objects(void) @@ -72,6 +71,7 @@ int main(int argc, char **argv) /* Handle arguments here .. */ usage(prune_packed_usage); } + sync(); prune_packed_objects(); return 0; }