From 62b876401efd25a1eb61adc8d4243f7a55ebf302 Mon Sep 17 00:00:00 2001 From: hniksic Date: Sun, 10 Dec 2000 16:31:14 -0800 Subject: [PATCH] [svn] Set the timestamp even when -O is used. --- src/ChangeLog | 7 +++++++ src/ftp.c | 6 +++--- src/http.c | 6 +++--- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index bb1b92b3..15840170 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2000-12-11 Hrvoje Niksic + + * ftp.c (ftp_retrieve_list): Ditto. + + * http.c (http_loop): Touch output_document if that is used for + output. + 2000-12-06 Hrvoje Niksic * http.c: Include gen_sslfunc.h after including Wget's headers. diff --git a/src/ftp.c b/src/ftp.c index a3fc3d33..bb0771cf 100644 --- 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); diff --git a/src/http.c b/src/http.c index 251215f5..6e103d96 100644 --- a/src/http.c +++ b/src/http.c @@ -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. */