mirror of https://github.com/xzeldon/htop.git
Settings: create default meters on no existing config file
If htop is started for the first time and no configuration file exists the header is empty cause no meters are added as a default. Add the default meters if parsing all available configuration paths failed.
This commit is contained in:
parent
74f99e3693
commit
becd33795c
|
@ -543,6 +543,9 @@ Settings* Settings_new(unsigned int initialCpuCount, Hashtable* dynamicColumns)
|
||||||
this->changed = true;
|
this->changed = true;
|
||||||
Settings_read(this, SYSCONFDIR "/htoprc", initialCpuCount);
|
Settings_read(this, SYSCONFDIR "/htoprc", initialCpuCount);
|
||||||
}
|
}
|
||||||
|
if (!ok) {
|
||||||
|
Settings_defaultMeters(this, initialCpuCount);
|
||||||
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue