diff options
author | des <des@FreeBSD.org> | 2000-07-18 07:12:26 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2000-07-18 07:12:26 +0000 |
commit | c5e43296676b72e89dd07896950fb452ceb29316 (patch) | |
tree | fe1c4dcc59769ab660807b65e1882a4df8c6c628 /lib/libfetch | |
parent | 82d6e5cbbcb28d0c60536f584fb5485245283bd6 (diff) | |
download | FreeBSD-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/libfetch')
-rw-r--r-- | lib/libfetch/ftp.c | 6 |
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 */ |