mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 20:05:58 +01:00
config: Avoid regenerating config if --config is used (#4103)
This commit is contained in:
parent
9132660768
commit
89d8f665b5
1 changed files with 8 additions and 2 deletions
|
@ -1610,10 +1610,16 @@ void CConfigManager::loadConfigLoadVars() {
|
|||
ifs.open(mainConfigPath);
|
||||
|
||||
if (!ifs.good()) {
|
||||
Debug::log(WARN, "Config reading error. Attempting to generate, backing up old one if exists");
|
||||
|
||||
ifs.close();
|
||||
|
||||
if (!g_pCompositor->explicitConfigPath.empty()) {
|
||||
Debug::log(WARN, "Config reading error!");
|
||||
parseError = "Broken config file! (Could not read)";
|
||||
return;
|
||||
}
|
||||
|
||||
Debug::log(WARN, "Config reading error. Attempting to generate, backing up old one if exists");
|
||||
|
||||
if (std::filesystem::exists(mainConfigPath))
|
||||
std::filesystem::rename(mainConfigPath, mainConfigPath + ".backup");
|
||||
|
||||
|
|
Loading…
Reference in a new issue