- /* This can only happen if you specify a file on the
- command line more than once. */
- fprintf (stderr,
- "%s: duplicate file specified: %s -- skipping\n",
- program_name, *files_to_move);
- goto next_file;
+ struct stat fsbuf, asbuf;
+
+ if (stat (*files_to_move, &fsbuf) != 0)
+ {
+ if (errno != ENOENT)
+ bfd_fatal (*files_to_move);
+ goto next_file;
+ }
+ if (bfd_stat_arch_elt (current, &asbuf) != 0)
+ fatal ("internal stat error on %s", current->filename);
+
+ if (fsbuf.st_mtime <= asbuf.st_mtime)
+ goto next_file;