mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-23 02:45:58 +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 = "";
|
std::string line = "";
|
||||||
int linenum = 1;
|
int linenum = 1;
|
||||||
if (ifs.is_open()) {
|
if (ifs.is_open()) {
|
||||||
|
auto configCurrentPathBackup = configCurrentPath;
|
||||||
|
|
||||||
while (std::getline(ifs, line)) {
|
while (std::getline(ifs, line)) {
|
||||||
// Read line by line.
|
// Read line by line.
|
||||||
try {
|
try {
|
||||||
|
@ -1259,6 +1261,8 @@ void CConfigManager::handleSource(const std::string& command, const std::string&
|
||||||
}
|
}
|
||||||
|
|
||||||
ifs.close();
|
ifs.close();
|
||||||
|
|
||||||
|
configCurrentPath = configCurrentPathBackup;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue