mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-05 14:42:01 -07:00
config: restore configCurrenPath after sourcing file (#3339)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user