mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 04:46:55 +03:00
(sftpfs_close_file): return actual result of sftp file close operation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
57be6c6c80
commit
bcdb78c7a0
@ -322,17 +322,18 @@ int
|
|||||||
sftpfs_close_file (vfs_file_handler_t * file_handler, GError ** mcerror)
|
sftpfs_close_file (vfs_file_handler_t * file_handler, GError ** mcerror)
|
||||||
{
|
{
|
||||||
sftpfs_file_handler_data_t *file_handler_data;
|
sftpfs_file_handler_data_t *file_handler_data;
|
||||||
|
int ret = -1;
|
||||||
|
|
||||||
mc_return_val_if_error (mcerror, -1);
|
mc_return_val_if_error (mcerror, -1);
|
||||||
|
|
||||||
file_handler_data = (sftpfs_file_handler_data_t *) file_handler->data;
|
file_handler_data = (sftpfs_file_handler_data_t *) file_handler->data;
|
||||||
if (file_handler_data == NULL)
|
if (file_handler_data != NULL)
|
||||||
return -1;
|
{
|
||||||
|
ret = libssh2_sftp_close (file_handler_data->handle);
|
||||||
libssh2_sftp_close (file_handler_data->handle);
|
|
||||||
|
|
||||||
g_free (file_handler_data);
|
g_free (file_handler_data);
|
||||||
return 0;
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* --------------------------------------------------------------------------------------------- */
|
/* --------------------------------------------------------------------------------------------- */
|
||||||
|
Loading…
Reference in New Issue
Block a user