From 0885eef1294ce1593fc5a08dd6f21411d7f87bc7 Mon Sep 17 00:00:00 2001 From: Steve Chamberlain Date: Tue, 29 Oct 1991 07:13:23 +0000 Subject: [PATCH] Don't care about an unlink failure --- binutils/ar.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/binutils/ar.c b/binutils/ar.c index f37713e25fd..4a504327954 100644 --- a/binutils/ar.c +++ b/binutils/ar.c @@ -692,8 +692,11 @@ write_archive() if (!bfd_close(obfd)) bfd_fatal(inarch->filename); - if (unlink(inarch->filename) != 0) - bfd_fatal(inarch->filename); + + /* We don't care if this fails, we might be creating the + archive */ + (void) unlink(inarch->filename); + if (rename(new_name, inarch->filename) != 0) bfd_fatal(inarch->filename); #if 0 -- 2.30.2