2004-12-05 Randolph Chung <tausq@debian.org>
[deliverable/binutils-gdb.git] / binutils / ar.c
index ab54ace33e4e8a227fb79952a5521e894c8b7084..6cc7941db126d9479de43600b0b29df3cb1ef626 100644 (file)
@@ -935,7 +935,12 @@ extract_file (bfd *abfd)
   chmod (bfd_get_filename (abfd), buf.st_mode);
 
   if (preserve_dates)
-    set_times (bfd_get_filename (abfd), &buf);
+    {
+      /* Set access time to modification time.  Only st_mtime is
+        initialized by bfd_stat_arch_elt.  */
+      buf.st_atime = buf.st_mtime;
+      set_times (bfd_get_filename (abfd), &buf);
+    }
 
   free (cbuf);
 }
This page took 0.024158 seconds and 4 git commands to generate.