diff options
author | Saturneric <[email protected]> | 2023-02-11 12:17:49 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2023-02-11 12:17:49 +0000 |
commit | b79ae9d7c3dd633c0b9013ae520f451be852019d (patch) | |
tree | 1940f43907974cab1b33ef350b05d50868c5323a /src/main.cpp | |
parent | feat: add an option to build with app sanbox on (diff) | |
download | GpgFrontend-b79ae9d7c3dd633c0b9013ae520f451be852019d.tar.gz GpgFrontend-b79ae9d7c3dd633c0b9013ae520f451be852019d.zip |
freat: allow to change gnupg install path
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/src/main.cpp b/src/main.cpp index 01964f6a..8243c068 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -74,6 +74,12 @@ extern void before_exit(); extern void init_logging_system(); /** + * @brief init global PATH env + * + */ +extern void init_global_path_env(); + +/** * * @param argc * @param argv @@ -104,19 +110,7 @@ int main(int argc, char* argv[]) { GpgFrontend::InitLoggingSystem(); // change path to search for related - std::string path_value = getenv("PATH"); - SPDLOG_DEBUG("PATH: {}", path_value); - setenv("PATH", - ((GpgFrontend::GlobalSettingStation::GetInstance() - .GetAppDir() - .parent_path() / - "GnuPG" / "bin") - .u8string() + - ":" + path_value) - .c_str(), - 1); - std::string modified_path_value = getenv("PATH"); - SPDLOG_DEBUG("Modified PATH: {}", modified_path_value); + init_global_path_env(); /** * internationalisation. loop to restart main window |