diff options
author | saturneric <[email protected]> | 2024-01-05 08:11:24 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2024-01-05 08:11:24 +0000 |
commit | 3c40fa27823e70215261d3845275360f85e59623 (patch) | |
tree | 7c39090027d8ad7fbe1662d7a73cc5748a2d5b52 /src/core/function/GlobalSettingStation.cpp | |
parent | feat: switch to portable mode by adding a txt file under bin path (diff) | |
download | GpgFrontend-3c40fa27823e70215261d3845275360f85e59623.tar.gz GpgFrontend-3c40fa27823e70215261d3845275360f85e59623.zip |
fix: slove some known issues
Diffstat (limited to 'src/core/function/GlobalSettingStation.cpp')
-rw-r--r-- | src/core/function/GlobalSettingStation.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/function/GlobalSettingStation.cpp b/src/core/function/GlobalSettingStation.cpp index e3970a6a..6290e866 100644 --- a/src/core/function/GlobalSettingStation.cpp +++ b/src/core/function/GlobalSettingStation.cpp @@ -31,8 +31,8 @@ #include <boost/dll.hpp> #include <filesystem> +#include "core/module/ModuleManager.h" #include "core/utils/FilesystemUtils.h" -#include "core/utils/IOUtils.h" namespace GpgFrontend { @@ -44,10 +44,11 @@ class GlobalSettingStation::Impl { */ explicit Impl() noexcept { SPDLOG_INFO("app path: {}", app_path_.u8string()); - auto protable_file_path = app_path_ / "PORTABLE.txt"; - if (std::filesystem::exists(protable_file_path)) { + auto portable_file_path = app_path_ / "PORTABLE.txt"; + if (std::filesystem::exists(portable_file_path)) { SPDLOG_INFO( - "dectected protable mode, reconfiguring config and data path..."); + "dectected portable mode, reconfiguring config and data path..."); + Module::UpsertRTValue("core", "env.state.portable", 1); app_configure_path_ = app_path_.parent_path(); config_dir_path_ = app_configure_path_ / "conf"; |