]> sjero.net Git - wget/commitdiff
[svn] Set the timestamp even when -O is used.
authorhniksic <devnull@localhost>
Mon, 11 Dec 2000 00:31:14 +0000 (16:31 -0800)
committerhniksic <devnull@localhost>
Mon, 11 Dec 2000 00:31:14 +0000 (16:31 -0800)
src/ChangeLog
src/ftp.c
src/http.c

index bb1b92b3a03b898be5824b054f7bf7cf0617cd7f..1584017096894fc4c7af52052aa5a376040543af 100644 (file)
@@ -1,3 +1,10 @@
+2000-12-11  Hrvoje Niksic  <hniksic@arsdigita.com>
+
+       * ftp.c (ftp_retrieve_list): Ditto.
+
+       * http.c (http_loop): Touch output_document if that is used for
+       output.
+
 2000-12-06  Hrvoje Niksic  <hniksic@arsdigita.com>
 
        * http.c: Include gen_sslfunc.h after including Wget's headers.
index a3fc3d333eaa115429027d14c07ce29e5ddfcded..bb0771cf6fcb62dca74fb312f6f03eefaaedbf30 100644 (file)
--- a/src/ftp.c
+++ b/src/ftp.c
@@ -1365,13 +1365,13 @@ Already have correct symlink %s -> %s\n\n"),
       /* Set the time-stamp information to the local file.  Symlinks
         are not to be stamped because it sets the stamp on the
         original.  :( */
-      if (!opt.dfp
-         && !(f->type == FT_SYMLINK && !opt.retr_symlinks)
+      if (!(f->type == FT_SYMLINK && !opt.retr_symlinks)
          && f->tstamp != -1
           && dlthis
          && file_exists_p (u->local))
        {
-         touch (u->local, f->tstamp);
+         const char *fl = opt.output_document ? opt.output_document : u->local;
+         touch (fl, f->tstamp);
        }
       else if (f->tstamp == -1)
        logprintf (LOG_NOTQUIET, _("%s: corrupt time-stamp.\n"), u->local);
index 251215f5c5953642e4c0a7c82a1569afee5d987d..6e103d968f45a0dd0f194010f778d62bd9a854c6 100644 (file)
@@ -1526,15 +1526,15 @@ The sizes do not match (local %ld) -- retrieving.\n"), local_size);
          FREEHSTAT (hstat);
          continue;
        }
-      if (!opt.dfp
-         && (tmr != (time_t) (-1))
+      if ((tmr != (time_t) (-1))
          && !opt.spider
          && ((hstat.len == hstat.contlen) ||
              ((hstat.res == 0) &&
               ((hstat.contlen == -1) ||
                (hstat.len >= hstat.contlen && !opt.kill_longer)))))
        {
-         touch (u->local, tmr);
+         const char *fl = opt.output_document ? opt.output_document : u->local;
+         touch (fl, tmr);
        }
       /* End of time-stamping section.  */