Fix rename op -- Take 2
Этот коммит содержится в:
родитель
beca3742a2
Коммит
6cc50263e2
6
README
6
README
@ -1,6 +1,12 @@
|
|||||||
libssh2 - SSH2 library
|
libssh2 - SSH2 library
|
||||||
======================
|
======================
|
||||||
|
|
||||||
|
Version 0.12
|
||||||
|
------------
|
||||||
|
|
||||||
|
Re-fixed libssh2_sftp_rename_ex()
|
||||||
|
Transport had right packet_len, but sftp layer still had extra 4 bytes.
|
||||||
|
|
||||||
Version 0.11
|
Version 0.11
|
||||||
------------
|
------------
|
||||||
|
|
||||||
|
@ -1113,8 +1113,9 @@ LIBSSH2_API int libssh2_sftp_rename_ex(LIBSSH2_SFTP *sftp, char *source_filenam
|
|||||||
LIBSSH2_CHANNEL *channel = sftp->channel;
|
LIBSSH2_CHANNEL *channel = sftp->channel;
|
||||||
LIBSSH2_SESSION *session = channel->session;
|
LIBSSH2_SESSION *session = channel->session;
|
||||||
unsigned long data_len, retcode = -1, request_id;
|
unsigned long data_len, retcode = -1, request_id;
|
||||||
unsigned long packet_len = source_filename_len + dest_filename_len + 21; /* packet_len(4) + packet_type(1) + request_id(4) +
|
unsigned long packet_len = source_filename_len + dest_filename_len + 17 + (sftp->version >= 5 ? 4 : 0);
|
||||||
source_filename_len(4) + dest_filename_len(4) + flags(4) */
|
/* packet_len(4) + packet_type(1) + request_id(4) +
|
||||||
|
source_filename_len(4) + dest_filename_len(4) + flags(4){SFTP5+) */
|
||||||
unsigned char *packet, *s, *data;
|
unsigned char *packet, *s, *data;
|
||||||
|
|
||||||
if (sftp->version < 2) {
|
if (sftp->version < 2) {
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user