diff options
author | Carl Worth <cworth@cworth.org> | 2006-02-17 16:14:52 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-02-17 16:20:51 -0800 |
commit | b5b16990f8b074bd0481ced047b8f8bf66eee6dc (patch) | |
tree | 9cc8cdea7f77cfbf98f72e7e46e22e33e578f510 /sha1_file.c | |
parent | eedf8f97e58bbf4717705900379f2d63134047f9 (diff) | |
download | git-b5b16990f8b074bd0481ced047b8f8bf66eee6dc.tar.gz git-b5b16990f8b074bd0481ced047b8f8bf66eee6dc.tar.xz |
Prevent git-upload-pack segfault if object cannot be found
Signed-off-by: Carl Worth <cworth@cworth.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'sha1_file.c')
-rw-r--r-- | sha1_file.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sha1_file.c b/sha1_file.c index 3d11a9bfd..f08b1d6ee 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -551,8 +551,10 @@ static void prepare_packed_git_one(char *objdir, int local) sprintf(path, "%s/pack", objdir); len = strlen(path); dir = opendir(path); - if (!dir) + if (!dir) { + fprintf(stderr, "unable to open object pack directory: %s: %s\n", path, strerror(errno)); return; + } path[len++] = '/'; while ((de = readdir(dir)) != NULL) { int namelen = strlen(de->d_name); |