Skip to content

Commit e083ea3

Browse files
committed
Merge branch 'ps/object-collision-check' into next
* ps/object-collision-check: object-file: fix race in object collision check
2 parents c24783e + 0ad3d65 commit e083ea3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

object-file.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1978,13 +1978,15 @@ static int check_collision(const char *filename_a, const char *filename_b)
19781978

19791979
fd_a = open(filename_a, O_RDONLY);
19801980
if (fd_a < 0) {
1981-
ret = error_errno(_("unable to open %s"), filename_a);
1981+
if (errno != ENOENT)
1982+
ret = error_errno(_("unable to open %s"), filename_a);
19821983
goto out;
19831984
}
19841985

19851986
fd_b = open(filename_b, O_RDONLY);
19861987
if (fd_b < 0) {
1987-
ret = error_errno(_("unable to open %s"), filename_b);
1988+
if (errno != ENOENT)
1989+
ret = error_errno(_("unable to open %s"), filename_b);
19881990
goto out;
19891991
}
19901992

0 commit comments

Comments
 (0)