Commit 7b4042b9 authored by Harald Sitter's avatar Harald Sitter 🌈
Browse files

add some extra debug in case stat fails

when createUDSEntry fails we'll really want to know what exactly happened
in libssh to help figure out what is wrong if something is wrong.

CCBUG: 406691
parent d8cf85ec
......@@ -414,6 +414,7 @@ bool SFTPInternal::createUDSEntry(const QString &filename, const QByteArray &pat
sftp_attributes sb = sftp_lstat(mSftp, path.constData());
if (sb == nullptr) {
qCDebug(KIO_SFTP_LOG) << "Failed to stat" << path << sftp_get_error(mSftp);
return false;
}
......@@ -422,6 +423,7 @@ bool SFTPInternal::createUDSEntry(const QString &filename, const QByteArray &pat
if (sb->type == SSH_FILEXFER_TYPE_SYMLINK) {
link = sftp_readlink(mSftp, path.constData());
if (link == nullptr) {
qCDebug(KIO_SFTP_LOG) << "Failed to readlink despite this being a link!" << path << sftp_get_error(mSftp);
sftp_attributes_free(sb);
return false;
}
......
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