mirror of
https://github.com/hyprwm/Hypr.git
synced 2024-11-26 14:55:58 +01:00
Fix no config found being stuck
This commit is contained in:
parent
c39ced01b0
commit
24db17f139
1 changed files with 4 additions and 2 deletions
|
@ -311,6 +311,8 @@ void ConfigManager::loadConfigLoadVars() {
|
||||||
if (!ifs.good()) {
|
if (!ifs.good()) {
|
||||||
Debug::log(WARN, "Config reading error. (No file?)");
|
Debug::log(WARN, "Config reading error. (No file?)");
|
||||||
ConfigManager::parseError = "The config could not be read. (No file?)";
|
ConfigManager::parseError = "The config could not be read. (No file?)";
|
||||||
|
|
||||||
|
ifs.close();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -407,11 +409,11 @@ void ConfigManager::tick() {
|
||||||
struct stat fileStat;
|
struct stat fileStat;
|
||||||
int err = stat(CONFIGPATH.c_str(), &fileStat);
|
int err = stat(CONFIGPATH.c_str(), &fileStat);
|
||||||
if (err != 0) {
|
if (err != 0) {
|
||||||
Debug::log(WARN, "Error at ticking config, error" + std::to_string(errno));
|
Debug::log(WARN, "Error at ticking config, error " + std::to_string(errno));
|
||||||
}
|
}
|
||||||
|
|
||||||
// check if we need to reload cfg
|
// check if we need to reload cfg
|
||||||
if(fileStat.st_mtime > lastModifyTime) {
|
if(fileStat.st_mtime != lastModifyTime) {
|
||||||
lastModifyTime = fileStat.st_mtime;
|
lastModifyTime = fileStat.st_mtime;
|
||||||
|
|
||||||
ConfigManager::loadConfigLoadVars();
|
ConfigManager::loadConfigLoadVars();
|
||||||
|
|
Loading…
Reference in a new issue