summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2000-07-18 07:12:26 +0000
committerdes <des@FreeBSD.org>2000-07-18 07:12:26 +0000
commitc5e43296676b72e89dd07896950fb452ceb29316 (patch)
treefe1c4dcc59769ab660807b65e1882a4df8c6c628 /lib
parent82d6e5cbbcb28d0c60536f584fb5485245283bd6 (diff)
downloadFreeBSD-src-c5e43296676b72e89dd07896950fb452ceb29316.zip
FreeBSD-src-c5e43296676b72e89dd07896950fb452ceb29316.tar.gz
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.
Diffstat (limited to 'lib')
-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