diff options
author | Judd Vinet <judd@archlinux.org> | 2004-07-03 06:25:48 +0200 |
---|---|---|
committer | Judd Vinet <judd@archlinux.org> | 2004-07-03 06:25:48 +0200 |
commit | f6661379c68b541115efe25285965bbd4eb32d25 (patch) | |
tree | 270ebd31a01ead27fd676ebac673a909cfc08534 /libftp/ftplib.c | |
parent | a2ee533f84aa858df5710d799c52b7d06a77b1de (diff) | |
download | pacman-f6661379c68b541115efe25285965bbd4eb32d25.tar.gz pacman-f6661379c68b541115efe25285965bbd4eb32d25.tar.xz |
Imported from pacman-2.8.tar.gz
Diffstat (limited to 'libftp/ftplib.c')
-rw-r--r-- | libftp/ftplib.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libftp/ftplib.c b/libftp/ftplib.c index 1e299b5b..b69744eb 100644 --- a/libftp/ftplib.c +++ b/libftp/ftplib.c @@ -1139,9 +1139,9 @@ static int FtpXfer(const char *localfile, const char *path, else { while ((l = FtpRead(dbuf, FTPLIB_BUFSIZ, nData)) > 0) - if (fwrite(dbuf, 1, l, local) <= 0) + if (fwrite(dbuf, 1, l, local) < l) { - perror("localfile write"); + perror("\nlocalfile write"); rv = 0; break; } @@ -1486,9 +1486,9 @@ static int HttpXfer(const char *localfile, const char *path, int *size, { nControl->dir = FTPLIB_READ; while ((l = FtpRead(dbuf, FTPLIB_BUFSIZ, nControl)) > 0) { - if (fwrite(dbuf, 1, l, local) <= 0) + if (fwrite(dbuf, 1, l, local) < l) { - perror("localfile write"); + perror("\nlocalfile write"); rv = 0; break; } |