mirror of
https://github.com/curl/curl.git
synced 2026-08-25 21:03:34 +03:00
tool_filetime: make -z work with file dates before 1970
Fixes #11785 Reported-by: Harry Sintonen Closes #11786
This commit is contained in:
parent
5949369c9f
commit
dffd996e3b
3 changed files with 17 additions and 14 deletions
|
|
@ -2648,11 +2648,11 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
|
|||
config->condtime = (curl_off_t)curl_getdate(nextarg, &now);
|
||||
if(-1 == config->condtime) {
|
||||
/* now let's see if it is a file name to get the time from instead! */
|
||||
curl_off_t filetime = getfiletime(nextarg, global);
|
||||
if(filetime >= 0) {
|
||||
curl_off_t filetime;
|
||||
rc = getfiletime(nextarg, global, &filetime);
|
||||
if(!rc)
|
||||
/* pull the time out from the file */
|
||||
config->condtime = filetime;
|
||||
}
|
||||
else {
|
||||
/* failed, remove time condition */
|
||||
config->timecond = CURL_TIMECOND_NONE;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue