mirror of
https://github.com/git/git.git
synced 2026-01-09 17:46:37 +00:00
prune: quiet ENOENT on missing directories
$GIT_DIR/objects/pack may be removed to save inodes in shared repositories. Quiet down prune in cases where either $GIT_DIR/objects or $GIT_DIR/objects/pack is non-existent, but emit the system error in other cases to help users diagnose permissions problems or resource constraints. Signed-off-by: Eric Wong <e@80x24.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
3dcec76d9d
commit
6974765352
@@ -127,7 +127,9 @@ static void remove_temporary_files(const char *path)
|
||||
|
||||
dir = opendir(path);
|
||||
if (!dir) {
|
||||
fprintf(stderr, "Unable to open directory %s\n", path);
|
||||
if (errno != ENOENT)
|
||||
fprintf(stderr, "Unable to open directory %s: %s\n",
|
||||
path, strerror(errno));
|
||||
return;
|
||||
}
|
||||
while ((de = readdir(dir)) != NULL)
|
||||
|
||||
Reference in New Issue
Block a user