From dad03e9ccc57da0a04d058ec418ce0068ce3841d Mon Sep 17 00:00:00 2001 From: Saturneric Date: Sat, 19 Mar 2022 14:09:55 +0800 Subject: (core, ui): Fix path double-byte encoding problem under Windows --- src/core/function/KeyPackageOperator.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/core/function/KeyPackageOperator.cpp') 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; } -- cgit v1.2.3