X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=src%2Fftp.c;h=2b9eb0f267e4b63a60db95ae19e7afe35990aebe;hp=bb0771cf6fcb62dca74fb312f6f03eefaaedbf30;hb=d5cd691b121120ec4ff1509f29519e98185fad4d;hpb=62b876401efd25a1eb61adc8d4243f7a55ebf302 diff --git a/src/ftp.c b/src/ftp.c index bb0771cf..2b9eb0f2 100644 --- a/src/ftp.c +++ b/src/ftp.c @@ -1370,8 +1370,18 @@ Already have correct symlink %s -> %s\n\n"), && dlthis && file_exists_p (u->local)) { - const char *fl = opt.output_document ? opt.output_document : u->local; - touch (fl, f->tstamp); + /* #### This code repeats in http.c and ftp.c. Move it to a + function! */ + const char *fl = NULL; + if (opt.output_document) + { + if (opt.od_known_regular) + fl = opt.output_document; + } + else + fl = u->local; + if (fl) + touch (fl, f->tstamp); } else if (f->tstamp == -1) logprintf (LOG_NOTQUIET, _("%s: corrupt time-stamp.\n"), u->local);