Rewrite sftp file copy to Qt way (#562)
Rewrite sftp file copy to Qt way
This commit is contained in:
parent
b05a5ee1c6
commit
16db23c159
3 changed files with 17 additions and 25 deletions
|
@ -211,13 +211,7 @@ ErrorCode ServerController::uploadFileToHost(const ServerCredentials &credential
|
|||
localFile.write(data);
|
||||
localFile.close();
|
||||
|
||||
#ifdef Q_OS_WINDOWS
|
||||
error = m_sshClient.sftpFileCopy(overwriteMode, localFile.fileName().toLocal8Bit().toStdString(), remotePath.toStdString(),
|
||||
"non_desc");
|
||||
#else
|
||||
error = m_sshClient.sftpFileCopy(overwriteMode, localFile.fileName().toStdString(), remotePath.toStdString(),
|
||||
"non_desc");
|
||||
#endif
|
||||
error = m_sshClient.sftpFileCopy(overwriteMode, localFile.fileName(), remotePath, "non_desc");
|
||||
|
||||
if (error != ErrorCode::NoError) {
|
||||
return error;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue