summaryrefslogtreecommitdiffstats
path: root/lib/libfetch/ftp.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libfetch/ftp.c')
-rw-r--r--lib/libfetch/ftp.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/libfetch/ftp.c b/lib/libfetch/ftp.c
index b141bc1..6fb16b2 100644
--- a/lib/libfetch/ftp.c
+++ b/lib/libfetch/ftp.c
@@ -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 */
OpenPOWER on IntegriCloud