binutils/
2005-05-06 Jan Beulich <jbeulich@novell.com> * objcopy.c (copy_file): Don't delete output upon error here. (copy_main): Delete output upon error.
This commit is contained in:
parent
8368879b12
commit
a580b8e051
|
@ -1,3 +1,8 @@
|
||||||
|
2005-05-06 Jan Beulich <jbeulich@novell.com>
|
||||||
|
|
||||||
|
* objcopy.c (copy_file): Don't delete output upon error here.
|
||||||
|
(copy_main): Delete output upon error.
|
||||||
|
|
||||||
2005-05-02 Ben Elliston <bje@au.ibm.com>
|
2005-05-02 Ben Elliston <bje@au.ibm.com>
|
||||||
|
|
||||||
* dlltool.c (dtab): Remove empty function.
|
* dlltool.c (dtab): Remove empty function.
|
||||||
|
|
|
@ -1731,7 +1731,6 @@ copy_file (const char *input_filename, const char *output_filename,
|
||||||
else if (bfd_check_format_matches (ibfd, bfd_object, &obj_matching))
|
else if (bfd_check_format_matches (ibfd, bfd_object, &obj_matching))
|
||||||
{
|
{
|
||||||
bfd *obfd;
|
bfd *obfd;
|
||||||
bfd_boolean delete;
|
|
||||||
do_copy:
|
do_copy:
|
||||||
|
|
||||||
/* bfd_get_target does not return the correct value until
|
/* bfd_get_target does not return the correct value until
|
||||||
|
@ -1743,7 +1742,8 @@ copy_file (const char *input_filename, const char *output_filename,
|
||||||
if (obfd == NULL)
|
if (obfd == NULL)
|
||||||
RETURN_NONFATAL (output_filename);
|
RETURN_NONFATAL (output_filename);
|
||||||
|
|
||||||
delete = ! copy_object (ibfd, obfd);
|
if (! copy_object (ibfd, obfd))
|
||||||
|
status = 1;
|
||||||
|
|
||||||
if (!bfd_close (obfd))
|
if (!bfd_close (obfd))
|
||||||
RETURN_NONFATAL (output_filename);
|
RETURN_NONFATAL (output_filename);
|
||||||
|
@ -1751,11 +1751,6 @@ copy_file (const char *input_filename, const char *output_filename,
|
||||||
if (!bfd_close (ibfd))
|
if (!bfd_close (ibfd))
|
||||||
RETURN_NONFATAL (input_filename);
|
RETURN_NONFATAL (input_filename);
|
||||||
|
|
||||||
if (delete)
|
|
||||||
{
|
|
||||||
unlink_if_ordinary (output_filename);
|
|
||||||
status = 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -3054,6 +3049,8 @@ copy_main (int argc, char *argv[])
|
||||||
|
|
||||||
if (status == 0 && preserve_dates)
|
if (status == 0 && preserve_dates)
|
||||||
set_times (output_filename, &statbuf);
|
set_times (output_filename, &statbuf);
|
||||||
|
else if (status != 0)
|
||||||
|
unlink_if_ordinary (output_filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (change_warn)
|
if (change_warn)
|
||||||
|
|
Loading…
Reference in New Issue