summaryrefslogtreecommitdiff
path: root/src/config/ConfigManager.cpp
diff options
context:
space:
mode:
authorLegorel <Legorel412@gmail.com>2023-09-25 00:11:34 +0200
committerGitHub <noreply@github.com>2023-09-24 23:11:34 +0100
commit6bdc45e9cec9aca56aa676a4e185e58b5d82c7e9 (patch)
tree807e5ce0353f283efb98060ad44c247372a1d72c /src/config/ConfigManager.cpp
parent46d66f4bcc95d9fb7fede18ad5c2c043796b9071 (diff)
config: restore configCurrenPath after sourcing file (#3339)
Diffstat (limited to 'src/config/ConfigManager.cpp')
-rw-r--r--src/config/ConfigManager.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp
index 3d231dbd..2eaee318 100644
--- a/src/config/ConfigManager.cpp
+++ b/src/config/ConfigManager.cpp
@@ -1239,6 +1239,8 @@ void CConfigManager::handleSource(const std::string& command, const std::string&
std::string line = "";
int linenum = 1;
if (ifs.is_open()) {
+ auto configCurrentPathBackup = configCurrentPath;
+
while (std::getline(ifs, line)) {
// Read line by line.
try {
@@ -1259,6 +1261,8 @@ void CConfigManager::handleSource(const std::string& command, const std::string&
}
ifs.close();
+
+ configCurrentPath = configCurrentPathBackup;
}
}
}