Don't care about an unlink failure
authorSteve Chamberlain <steve@cygnus>
Tue, 29 Oct 1991 07:13:23 +0000 (07:13 +0000)
committerSteve Chamberlain <steve@cygnus>
Tue, 29 Oct 1991 07:13:23 +0000 (07:13 +0000)
binutils/ar.c

index f37713e25fdc60b6be4abd5aee57376835b814ae..4a5043279542d97f9c1dc597e14460fecf35eed7 100644 (file)
@@ -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