mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 16:25:59 +01:00
config: restore configCurrenPath after sourcing file (#3339)
This commit is contained in:
parent
46d66f4bcc
commit
6bdc45e9ce
1 changed files with 4 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue