aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/function/gpg/GpgCommandExecutor.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2023-10-23 13:23:37 +0000
committersaturneric <[email protected]>2023-10-23 13:23:37 +0000
commit5a3f422335b27c6c19a2d91f525c77435e8f2384 (patch)
treea72d417cc040f07fd7e21f9bd2cc70d0de5e8bed /src/core/function/gpg/GpgCommandExecutor.cpp
parentperf: reduce header includes and improve build speed (diff)
downloadGpgFrontend-5a3f422335b27c6c19a2d91f525c77435e8f2384.tar.gz
GpgFrontend-5a3f422335b27c6c19a2d91f525c77435e8f2384.zip
fix: solve some issues on log system
Diffstat (limited to 'src/core/function/gpg/GpgCommandExecutor.cpp')
-rw-r--r--src/core/function/gpg/GpgCommandExecutor.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/core/function/gpg/GpgCommandExecutor.cpp b/src/core/function/gpg/GpgCommandExecutor.cpp
index c367bd72..ba2b7e02 100644
--- a/src/core/function/gpg/GpgCommandExecutor.cpp
+++ b/src/core/function/gpg/GpgCommandExecutor.cpp
@@ -27,12 +27,11 @@
*/
#include "GpgCommandExecutor.h"
-#include <memory>
-#include <string>
+#include <boost/format.hpp>
#include "GpgFunctionObject.h"
+#include "core/thread/DataObject.h"
#include "core/thread/TaskRunnerGetter.h"
-#include "thread/DataObject.h"
namespace GpgFrontend {
@@ -196,8 +195,15 @@ Thread::Task *GpgCommandExecutor::build_task(const ExecuteContext &context) {
return 0;
};
+ const std::string joined_argument = std::accumulate(
+ std::begin(arguments), std::end(arguments), std::string(),
+ [](const std::string &a, const std::string &b) -> std::string {
+ return a + (a.length() > 0 ? " " : "") + b;
+ });
+
return new Thread::Task(
- std::move(runner), fmt::format("Execute/{}", cmd),
+ std::move(runner),
+ (boost::format("Execute(%1%){%2%}") % cmd % joined_argument).str(),
Thread::TransferParams(cmd, arguments, interact_function, callback),
std::move(result_callback));
}