diff --git a/src/config.cpp b/src/config.cpp index 6569ca4b..6bddbc8d 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -46,6 +46,8 @@ constexpr static const char CACHE_FILES_PROCESS_NAMES_DEFAULT[] = Config cfg; +thread_local int Config::CfgConfigFile::_depth = 0; + Config::CfgConfigFile::CfgConfigFile() { } diff --git a/src/config.hpp b/src/config.hpp index 50b2d096..10637896 100644 --- a/src/config.hpp +++ b/src/config.hpp @@ -95,7 +95,7 @@ public: { private: fs::path _cfg_file; - int _depth = 0; + static thread_local int _depth; public: CfgConfigFile();