mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
[svn] Compensate for MS Windows two-second granularity of file modification
timestamps. Submitted by Ian Abbott in <3CB7355C.21011.2134FDA@localhost>.
This commit is contained in:
parent
cfd7b9a951
commit
4aaf8fdcea
@ -1,3 +1,10 @@
|
||||
2002-04012 Ian Abbott <abbotti@mev.co.uk>
|
||||
|
||||
* http.c (http_loop): Compensate for MS Windows two-second
|
||||
granularity of file modification time when comparing timestamps.
|
||||
|
||||
* ftp.c (ftp_retrieve_list): Ditto.
|
||||
|
||||
2002-04-12 Ian Abbott <abbotti@mev.co.uk>
|
||||
|
||||
* utils.c (has_html_suffix_p): New function to test filename for
|
||||
|
@ -1302,6 +1302,11 @@ ftp_retrieve_list (struct url *u, struct fileinfo *f, ccon *con)
|
||||
/* Else, get it from the file. */
|
||||
local_size = st.st_size;
|
||||
tml = st.st_mtime;
|
||||
#ifdef WINDOWS
|
||||
/* Modification time granularity is 2 seconds for Windows, so
|
||||
increase local time by 1 second for later comparison. */
|
||||
tml++;
|
||||
#endif
|
||||
/* Compare file sizes only for servers that tell us correct
|
||||
values. Assumme sizes being equal for servers that lie
|
||||
about file size. */
|
||||
|
@ -1520,6 +1520,11 @@ File `%s' already there, will not retrieve.\n"), *hstat.local_file);
|
||||
{
|
||||
use_ts = 1;
|
||||
tml = st.st_mtime;
|
||||
#ifdef WINDOWS
|
||||
/* Modification time granularity is 2 seconds for Windows, so
|
||||
increase local time by 1 second for later comparison. */
|
||||
tml++;
|
||||
#endif
|
||||
local_size = st.st_size;
|
||||
got_head = 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user