+2010-01-09 David Holman <holman.david@gmail.com>
+
+ * init.c, main.c, http.c, ftp.c: Added support for
+ --no-match-server-timestamps.
+
2009-12-03 Peter Rosin <peda@lysator.liu.se>
* snprintf.c (dopr): Output %p as unsigned.
original. :( */
if (actual_target != NULL)
{
- if (!(f->type == FT_SYMLINK && !opt.retr_symlinks)
+ if (opt.matchservertimestamps
+ && !(f->type == FT_SYMLINK && !opt.retr_symlinks)
&& f->tstamp != -1
&& dlthis
&& file_exists_p (con->target))
} /* send_head_first */
} /* !got_head */
- if ((tmr != (time_t) (-1))
+ if (opt.matchservertimestamps
+ && (tmr != (time_t) (-1))
&& ((hstat.len == hstat.contlen) ||
((hstat.res == 0) && (hstat.contlen == -1))))
{
{ "localencoding", &opt.locale, cmd_string },
{ "logfile", &opt.lfilename, cmd_file },
{ "login", &opt.ftp_user, cmd_string },/* deprecated*/
+ { "matchservertimestamps", &opt.matchservertimestamps, cmd_boolean },
{ "maxredirect", &opt.max_redirect, cmd_number },
{ "mirror", NULL, cmd_spec_mirror },
{ "netrc", &opt.netrc, cmd_boolean },
#endif
opt.locale = NULL;
opt.encoding_remote = NULL;
+
+ opt.matchservertimestamps = true;
}
\f
/* Return the user's home directory (strdup-ed), or NULL if none is
{ "limit-rate", 0, OPT_VALUE, "limitrate", -1 },
{ "load-cookies", 0, OPT_VALUE, "loadcookies", -1 },
{ "local-encoding", 0, OPT_VALUE, "localencoding", -1 },
+ { "match-server-timestamps", 0, OPT_BOOLEAN, "matchservertimestamps", -1 },
{ "max-redirect", 0, OPT_VALUE, "maxredirect", -1 },
{ "mirror", 'm', OPT_BOOLEAN, "mirror", -1 },
{ "no", 'n', OPT__NO, NULL, required_argument },
int ftp_stmlf; /* Force Stream_LF format for binary FTP. */
#endif /* def __VMS */
+ bool matchservertimestamps; /* Update downloaded files' timestamps to
+ match those on server? */
+
};
extern struct options opt;