diff options
author | saturneric <[email protected]> | 2024-01-01 09:50:54 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2024-01-01 09:50:54 +0000 |
commit | dcdd494d7f6654a5e2d608d37f69e16cb15fa845 (patch) | |
tree | da6dd3b048beb13496cf44c39769dca93e360fc4 /src/core/utils/GpgUtils.cpp | |
parent | feat: improve file browser's functions and tidy up codes (diff) | |
download | GpgFrontend-dcdd494d7f6654a5e2d608d37f69e16cb15fa845.tar.gz GpgFrontend-dcdd494d7f6654a5e2d608d37f69e16cb15fa845.zip |
fix: find and solve some issues
Diffstat (limited to 'src/core/utils/GpgUtils.cpp')
-rw-r--r-- | src/core/utils/GpgUtils.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/core/utils/GpgUtils.cpp b/src/core/utils/GpgUtils.cpp index 20a96e12..cd5a6772 100644 --- a/src/core/utils/GpgUtils.cpp +++ b/src/core/utils/GpgUtils.cpp @@ -30,8 +30,6 @@ #include <boost/algorithm/string.hpp> -#include "core/utils/IOUtils.h" - namespace GpgFrontend { static inline void Ltrim(std::string& s) { @@ -131,7 +129,7 @@ auto SetExtensionOfOutputFile(std::filesystem::path path, GpgOperation opera, case kENCRYPT: case kSIGN: case kENCRYPT_SIGN: - extension += ".asc"; + extension = path.extension().string() + ".asc"; break; default: break; @@ -140,10 +138,10 @@ auto SetExtensionOfOutputFile(std::filesystem::path path, GpgOperation opera, switch (opera) { case kENCRYPT: case kENCRYPT_SIGN: - extension += ".gpg"; + extension = path.extension().string() + ".gpg"; break; case kSIGN: - extension = ".sig"; + extension = path.extension().string() + ".sig"; break; default: break; |