summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--object-file.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/object-file.c b/object-file.c
index b1a3463852..0293b93bbc 100644
--- a/object-file.c
+++ b/object-file.c
@@ -1982,13 +1982,15 @@ static int check_collision(const char *filename_a, const char *filename_b)
fd_a = open(filename_a, O_RDONLY);
if (fd_a < 0) {
- ret = error_errno(_("unable to open %s"), filename_a);
+ if (errno != ENOENT)
+ ret = error_errno(_("unable to open %s"), filename_a);
goto out;
}
fd_b = open(filename_b, O_RDONLY);
if (fd_b < 0) {
- ret = error_errno(_("unable to open %s"), filename_b);
+ if (errno != ENOENT)
+ ret = error_errno(_("unable to open %s"), filename_b);
goto out;
}