From b8041fe4d84bc75212cb6161d508fd1e9d2203ab Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sun, 16 Oct 2005 14:09:50 -0700 Subject: [PATCH] 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 --- prune-packed.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prune-packed.c b/prune-packed.c index 73f0f3a462..1e0fc0cd9e 100644 --- a/prune-packed.c +++ b/prune-packed.c @@ -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); }