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 */
else
{
char *targ = NULL;
- int cwd_count;
- int cwd_end;
- int cwd_start;
+ int cwd_count;
+ int cwd_end;
+ int cwd_start;
char *target = u->dir;
# define BIN_TYPE_FILE 1
#endif /* def __VMS [else] */
- if (restval && !(con->cmd & DO_LIST))
+ if ((restval && !(con->cmd & DO_LIST)) || count > 0)
{
#ifdef __VMS
int open_id;
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;