Skip to content

Commit

Permalink
Merge pull request #453 from amnezia-vpn/bugfix/windows-crush-on-utf8…
Browse files Browse the repository at this point in the history
…-symbolos

added conversion using the system locale
  • Loading branch information
pokamest authored Jan 11, 2024
2 parents 77be816 + 69dd415 commit 50ea4d3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions client/core/controllers/serverController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 50ea4d3

Please sign in to comment.