aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/utils/GpgUtils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/utils/GpgUtils.cpp')
-rw-r--r--src/core/utils/GpgUtils.cpp8
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;