The brain-dead FTP servers on Solaris don't support the size command.
This commit is contained in:
parent
9e4100bf95
commit
bc059bc7fa
@ -143,6 +143,9 @@ static int ftp_recieve(ftp_host_info_t *server, FILE *control_stream,
|
|||||||
if (safe_strtoul(buf + 4, &value))
|
if (safe_strtoul(buf + 4, &value))
|
||||||
bb_error_msg_and_die("SIZE error: %s", buf + 4);
|
bb_error_msg_and_die("SIZE error: %s", buf + 4);
|
||||||
filesize = value;
|
filesize = value;
|
||||||
|
} else {
|
||||||
|
filesize = -1;
|
||||||
|
do_continue = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((local_path[0] == '-') && (local_path[1] == '\0')) {
|
if ((local_path[0] == '-') && (local_path[1] == '\0')) {
|
||||||
@ -185,8 +188,12 @@ static int ftp_recieve(ftp_host_info_t *server, FILE *control_stream,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Copy the file */
|
/* Copy the file */
|
||||||
if (bb_copyfd_size(fd_data, fd_local, filesize) == -1) {
|
if (filesize != -1) {
|
||||||
exit(EXIT_FAILURE);
|
if (-1 == bb_copyfd_size(fd_data, fd_local, filesize))
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
} else {
|
||||||
|
if (-1 == bb_copyfd_eof(fd_data, fd_local))
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* close it all down */
|
/* close it all down */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user