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:
@ -27,7 +27,7 @@ static void prune_dir(int i, DIR *dir, char *pathname, int len)
|
|||||||
error("unable to unlink %s", pathname);
|
error("unable to unlink %s", pathname);
|
||||||
}
|
}
|
||||||
pathname[len] = 0;
|
pathname[len] = 0;
|
||||||
if (rmdir(pathname))
|
if (!rmdir(pathname))
|
||||||
mkdir(pathname, 0777);
|
mkdir(pathname, 0777);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user