Sparse-directory safety fix.

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>
This commit is contained in:
Junio C Hamano 2005-10-16 14:09:50 -07:00
parent f865a2ad98
commit b8041fe4d8

View File

@ -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);
}