Merge pull request #453 from amnezia-vpn/bugfix/windows-crush-on-utf8-symbolos

added conversion using the system locale
This commit is contained in:
pokamest 2024-01-11 07:51:22 -05:00 committed by GitHub
commit 50ea4d3b0f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -211,8 +211,14 @@ 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
if (error != ErrorCode::NoError) {
return error;
}