Don't take a failure to stat a file to mean that it doesn't exist, as it may
be a dynamically created file, e.g. a tarball on servers that support sending tarballs of directories.
This commit is contained in:
parent
482cf5c2e7
commit
269532d987
@ -240,6 +240,9 @@ _ftp_stat(int cd, char *file, struct url_stat *us)
|
||||
time_t t;
|
||||
int e;
|
||||
|
||||
us->size = -1;
|
||||
us->atime = us->mtime = 0;
|
||||
|
||||
if ((s = strrchr(file, '/')) == NULL)
|
||||
s = file;
|
||||
else
|
||||
@ -772,7 +775,8 @@ fetchXGetFTP(struct url *url, struct url_stat *us, char *flags)
|
||||
return NULL;
|
||||
|
||||
/* stat file */
|
||||
if (us && _ftp_stat(cd, url->doc, us) == -1)
|
||||
if (us && _ftp_stat(cd, url->doc, us) == -1
|
||||
&& fetchLastErrCode != FETCH_UNAVAIL)
|
||||
return NULL;
|
||||
|
||||
/* initiate the transfer */
|
||||
|
Loading…
x
Reference in New Issue
Block a user