mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
--no-match-server-timestamps
This commit is contained in:
parent
8798e25533
commit
1f08245076
@ -1,3 +1,8 @@
|
|||||||
|
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>
|
2009-12-03 Peter Rosin <peda@lysator.liu.se>
|
||||||
|
|
||||||
* snprintf.c (dopr): Output %p as unsigned.
|
* snprintf.c (dopr): Output %p as unsigned.
|
||||||
|
@ -1849,7 +1849,8 @@ Already have correct symlink %s -> %s\n\n"),
|
|||||||
original. :( */
|
original. :( */
|
||||||
if (actual_target != NULL)
|
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
|
&& f->tstamp != -1
|
||||||
&& dlthis
|
&& dlthis
|
||||||
&& file_exists_p (con->target))
|
&& file_exists_p (con->target))
|
||||||
|
@ -2909,7 +2909,8 @@ Remote file exists.\n\n"));
|
|||||||
} /* send_head_first */
|
} /* send_head_first */
|
||||||
} /* !got_head */
|
} /* !got_head */
|
||||||
|
|
||||||
if ((tmr != (time_t) (-1))
|
if (opt.matchservertimestamps
|
||||||
|
&& (tmr != (time_t) (-1))
|
||||||
&& ((hstat.len == hstat.contlen) ||
|
&& ((hstat.len == hstat.contlen) ||
|
||||||
((hstat.res == 0) && (hstat.contlen == -1))))
|
((hstat.res == 0) && (hstat.contlen == -1))))
|
||||||
{
|
{
|
||||||
|
@ -197,6 +197,7 @@ static const struct {
|
|||||||
{ "localencoding", &opt.locale, cmd_string },
|
{ "localencoding", &opt.locale, cmd_string },
|
||||||
{ "logfile", &opt.lfilename, cmd_file },
|
{ "logfile", &opt.lfilename, cmd_file },
|
||||||
{ "login", &opt.ftp_user, cmd_string },/* deprecated*/
|
{ "login", &opt.ftp_user, cmd_string },/* deprecated*/
|
||||||
|
{ "matchservertimestamps", &opt.matchservertimestamps, cmd_boolean },
|
||||||
{ "maxredirect", &opt.max_redirect, cmd_number },
|
{ "maxredirect", &opt.max_redirect, cmd_number },
|
||||||
{ "mirror", NULL, cmd_spec_mirror },
|
{ "mirror", NULL, cmd_spec_mirror },
|
||||||
{ "netrc", &opt.netrc, cmd_boolean },
|
{ "netrc", &opt.netrc, cmd_boolean },
|
||||||
@ -353,6 +354,8 @@ defaults (void)
|
|||||||
#endif
|
#endif
|
||||||
opt.locale = NULL;
|
opt.locale = NULL;
|
||||||
opt.encoding_remote = NULL;
|
opt.encoding_remote = NULL;
|
||||||
|
|
||||||
|
opt.matchservertimestamps = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return the user's home directory (strdup-ed), or NULL if none is
|
/* Return the user's home directory (strdup-ed), or NULL if none is
|
||||||
|
@ -218,6 +218,7 @@ static struct cmdline_option option_data[] =
|
|||||||
{ "limit-rate", 0, OPT_VALUE, "limitrate", -1 },
|
{ "limit-rate", 0, OPT_VALUE, "limitrate", -1 },
|
||||||
{ "load-cookies", 0, OPT_VALUE, "loadcookies", -1 },
|
{ "load-cookies", 0, OPT_VALUE, "loadcookies", -1 },
|
||||||
{ "local-encoding", 0, OPT_VALUE, "localencoding", -1 },
|
{ "local-encoding", 0, OPT_VALUE, "localencoding", -1 },
|
||||||
|
{ "match-server-timestamps", 0, OPT_BOOLEAN, "matchservertimestamps", -1 },
|
||||||
{ "max-redirect", 0, OPT_VALUE, "maxredirect", -1 },
|
{ "max-redirect", 0, OPT_VALUE, "maxredirect", -1 },
|
||||||
{ "mirror", 'm', OPT_BOOLEAN, "mirror", -1 },
|
{ "mirror", 'm', OPT_BOOLEAN, "mirror", -1 },
|
||||||
{ "no", 'n', OPT__NO, NULL, required_argument },
|
{ "no", 'n', OPT__NO, NULL, required_argument },
|
||||||
|
@ -246,6 +246,9 @@ struct options
|
|||||||
int ftp_stmlf; /* Force Stream_LF format for binary FTP. */
|
int ftp_stmlf; /* Force Stream_LF format for binary FTP. */
|
||||||
#endif /* def __VMS */
|
#endif /* def __VMS */
|
||||||
|
|
||||||
|
bool matchservertimestamps; /* Update downloaded files' timestamps to
|
||||||
|
match those on server? */
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
extern struct options opt;
|
extern struct options opt;
|
||||||
|
Loading…
Reference in New Issue
Block a user