Don't call _ftp_closefn() upon EOF in _ftp_readfn(); just return 0. This

fixes a bug in pkg_add(1) (which nobody noticed because of another bug).
This commit is contained in:
Dag-Erling Smørgrav 2001-06-11 14:12:46 +00:00
parent e1d071dbfd
commit 9e2a792c46
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=78071

View File

@ -349,7 +349,7 @@ _ftp_readfn(void *v, char *buf, int len)
return r;
if (r == 0) {
io->eof = 1;
return _ftp_closefn(v);
return 0;
}
if (errno != EINTR)
io->err = errno;