Commit ebaa00ec authored by Harald Sitter's avatar Harald Sitter 🌈
Browse files

sftp: give better debug messages on read failures

failure to read without context is kinda useless, so print all errors we
can get our hand on
parent 18e111c6
......@@ -1441,7 +1441,10 @@ Result SFTPInternal::read(KIO::filesize_t bytes)
Q_ASSERT(bytesRead <= static_cast<ssize_t>(bytes));
if (bytesRead < 0) {
qCDebug(KIO_SFTP_LOG) << "Could not read " << mOpenUrl;
qCDebug(KIO_SFTP_LOG) << "Could not read" << mOpenUrl
<< sftp_get_error(mSftp)
<< ssh_get_error_code(mSession)
<< ssh_get_error(mSession);
close();
return Result::fail(KIO::ERR_CANNOT_READ, mOpenUrl.toDisplayString());
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment