aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/function/KeyPackageOperator.cpp
diff options
context:
space:
mode:
authorSaturneric <[email protected]>2022-03-19 06:09:55 +0000
committerSaturneric <[email protected]>2022-03-19 06:09:55 +0000
commitdad03e9ccc57da0a04d058ec418ce0068ce3841d (patch)
treee3d6bec71f3c070139ef5dfa7cca0cf70acb4dd1 /src/core/function/KeyPackageOperator.cpp
parent<fix>(ui): Fix the problem that the file cannot be signed (diff)
downloadGpgFrontend-dad03e9ccc57da0a04d058ec418ce0068ce3841d.tar.gz
GpgFrontend-dad03e9ccc57da0a04d058ec418ce0068ce3841d.zip
<fix>(core, ui): Fix path double-byte encoding problem under Windows
Diffstat (limited to 'src/core/function/KeyPackageOperator.cpp')
-rw-r--r--src/core/function/KeyPackageOperator.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/function/KeyPackageOperator.cpp b/src/core/function/KeyPackageOperator.cpp
index 2b2802f7..67fa3fac 100644
--- a/src/core/function/KeyPackageOperator.cpp
+++ b/src/core/function/KeyPackageOperator.cpp
@@ -73,13 +73,13 @@ bool KeyPackageOperator::ImportKeyPackage(
const std::filesystem::path& phrase_path,
GpgFrontend::GpgImportInformation& import_info) {
- LOG(INFO) << "Importing key package: " << key_package_path.string();
+ LOG(INFO) << "Importing key package: " << key_package_path.u8string();
std::string encrypted_data;
FileOperator::ReadFileStd(key_package_path, encrypted_data);
if (encrypted_data.empty()) {
- LOG(ERROR) << "Failed to read key package: " << key_package_path.string();
+ LOG(ERROR) << "Failed to read key package: " << key_package_path.u8string();
return false;
};
@@ -87,7 +87,7 @@ bool KeyPackageOperator::ImportKeyPackage(
FileOperator::ReadFileStd(phrase_path, passphrase);
LOG(INFO) << "Passphrase: " << passphrase.size() << " bytes";
if (passphrase.size() != 256) {
- LOG(ERROR) << "Failed to read passphrase: " << phrase_path.string();
+ LOG(ERROR) << "Failed to read passphrase: " << phrase_path.u8string();
return false;
}