Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-10-17 01:09:50 +0400
committerJunio C Hamano <junkio@cox.net>2005-10-17 01:09:50 +0400
commitb8041fe4d84bc75212cb6161d508fd1e9d2203ab (patch)
tree76ee9e1705033a37c350cd56a956dc6db7623a9a /prune-packed.c
parentf865a2ad981f72423aa1c19412ce57c543801957 (diff)
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>
Diffstat (limited to 'prune-packed.c')
-rw-r--r--prune-packed.c2
1 files changed, 1 insertions, 1 deletions
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);
}