mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-07 07:31:53 -07:00
config: Avoid regenerating config if --config is used (#4103)
This commit is contained in:
@@ -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");
|
||||
|
||||
|
Reference in New Issue
Block a user