summaryrefslogtreecommitdiff
path: root/prune-packed.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-10-16 21:09:50 (GMT)
committerJunio C Hamano <junkio@cox.net>2005-10-16 21:09:50 (GMT)
commitb8041fe4d84bc75212cb6161d508fd1e9d2203ab (patch)
tree76ee9e1705033a37c350cd56a956dc6db7623a9a /prune-packed.c
parentf865a2ad981f72423aa1c19412ce57c543801957 (diff)
downloadgit-b8041fe4d84bc75212cb6161d508fd1e9d2203ab.zip
git-b8041fe4d84bc75212cb6161d508fd1e9d2203ab.tar.gz
git-b8041fe4d84bc75212cb6161d508fd1e9d2203ab.tar.bz2
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 73f0f3a..1e0fc0c 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);
}