Skip to content

Commit

Permalink
Sparse-directory safety fix.
Browse files Browse the repository at this point in the history
This will be removed when merging the second phase of Linus' "Create
object subdirectories on demand" change anyway, but the code to
recreate the empty .git/objects/??/ directory was confused.

Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Junio C Hamano committed Oct 16, 2005
1 parent f865a2a commit b8041fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion prune-packed.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +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))
if (!rmdir(pathname))
mkdir(pathname, 0777);
}

Expand Down

0 comments on commit b8041fe

Please sign in to comment.