X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=src%2Fftp.c;fp=src%2Fftp.c;h=8dddeed89cba85e1d83db44562c3a9c208edf059;hp=42884d453a53635f13ca7c84a51b1a3013197cfb;hb=a2596ccf21620611a377699482ca4080d22e0987;hpb=8c7afaf3bb737e50bf289c2a2d60128425d1426b diff --git a/src/ftp.c b/src/ftp.c index 42884d45..8dddeed8 100644 --- a/src/ftp.c +++ b/src/ftp.c @@ -241,7 +241,7 @@ static uerr_t ftp_get_listing (struct url *, ccon *, struct fileinfo **); and closes the control connection in case of error. */ static uerr_t getftp (struct url *u, wgint passed_expected_bytes, wgint *qtyread, - wgint restval, ccon *con) + wgint restval, ccon *con, int count) { int csock, dtsock, local_sock, res; uerr_t err = RETROK; /* appease the compiler */ @@ -1172,7 +1172,7 @@ Error in server response, closing control connection.\n")); #endif /* def __VMS [else] */ } else if (opt.noclobber || opt.always_rest || opt.timestamping || opt.dirstruct - || opt.output_document) + || opt.output_document || count > 0) { if (opt.unlink && file_exists_p (con->target)) { @@ -1488,7 +1488,7 @@ ftp_loop_internal (struct url *u, struct fileinfo *f, ccon *con, char **local_fi len = f->size; else len = 0; - err = getftp (u, len, &qtyread, restval, con); + err = getftp (u, len, &qtyread, restval, con, count); if (con->csock == -1) con->st &= ~DONE_CWD;