diff --git a/sha1_file.c b/sha1_file.c
index 1cafdfa617a833ec757b481826dc62282be8f374..d86a8db69ade6fd26ebd88bbb361a7a86838f14e 100644 (file)
--- a/sha1_file.c
+++ b/sha1_file.c
return data;
}
- if (errno != ENOENT)
+ if (errno && errno != ENOENT)
die_errno("failed to read object %s", sha1_to_hex(sha1));
/* die if we replaced an object with one that does not exist */