forked from qt-creator/qt-creator
SSH: Don't call FileReader::fetch() with empty file name.
Harmless, but triggers a warning in Qt. Change-Id: I8d86a5bf28a66e47a680d9dd277c4c85b1a8f63f Reviewed-by: Christian Kandeler <christian.kandeler@nokia.com>
This commit is contained in:
@@ -454,6 +454,8 @@ void SshConnectionPrivate::handleServiceAcceptPacket()
|
||||
SshCapabilities::SshConnectionService, m_connParams.password.toUtf8());
|
||||
} else {
|
||||
Utils::FileReader reader;
|
||||
if (m_connParams.privateKeyFile.isEmpty())
|
||||
throw SshClientException(SshKeyFileError, tr("No private key file given."));
|
||||
if (!reader.fetch(m_connParams.privateKeyFile))
|
||||
throw SshClientException(SshKeyFileError,
|
||||
tr("Private key error: %1").arg(reader.errorString()));
|
||||
|
||||
Reference in New Issue
Block a user