Skip to content
Snippets Groups Projects
Commit 10fefe78 authored by Richard W.M. Jones's avatar Richard W.M. Jones
Browse files

ssh: Print the failed path in error message

Before the error message was:

  nbdkit: ssh[1]: error: cannot open file for reading: SFTP server: No such file

After this change we get a slightly better error message:

  nbdkit: ssh[1]: error: /nosuchfile: cannot open file for reading: SFTP server: No such file
parent 1a6b1eba
No related branches found
No related tags found
No related merge requests found
Pipeline #1138990612 passed
......@@ -407,7 +407,8 @@ open_or_create_path (ssh_session session, sftp_session sftp, int readonly)
file = sftp_open (sftp, path, access_type, S_IRWXU);
if (!file) {
nbdkit_error ("cannot %s file for %s: %s",
nbdkit_error ("%s: cannot %s file for %s: %s",
path,
create ? "create" : "open",
readonly ? "reading" : "writing",
ssh_get_error (session));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment