Skip to content

Commit b8041fe

Browse files
author
Junio C Hamano
committed
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>
1 parent f865a2a commit b8041fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

prune-packed.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ static void prune_dir(int i, DIR *dir, char *pathname, int len)
2727
error("unable to unlink %s", pathname);
2828
}
2929
pathname[len] = 0;
30-
if (rmdir(pathname))
30+
if (!rmdir(pathname))
3131
mkdir(pathname, 0777);
3232
}
3333

0 commit comments

Comments
 (0)