SFTP: provide the numerical error reason on failure
This commit is contained in:
parent
1c3e1c4d25
commit
82fa5d2167
@ -245,7 +245,8 @@ int main(int argc, char *argv[])
|
||||
libssh2_sftp_open(sftp_session, sftppath, LIBSSH2_FXF_READ, 0);
|
||||
|
||||
if (!sftp_handle) {
|
||||
fprintf(stderr, "Unable to open file with SFTP\n");
|
||||
fprintf(stderr, "Unable to open file with SFTP: %ld\n",
|
||||
libssh2_sftp_last_error(sftp_session));
|
||||
goto shutdown;
|
||||
}
|
||||
fprintf(stderr, "libssh2_sftp_open() is done, now receive data!\n");
|
||||
|
Loading…
x
Reference in New Issue
Block a user