mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-15 12:23:15 +00:00
utmpupdate: Don't complain about an error if the utmp is just empty
This removes a misleading error message during startup.
This commit is contained in:
parent
3b3e7d3f46
commit
2a22d346dc
|
@ -80,10 +80,12 @@ int main(int argc, char** argv)
|
|||
|
||||
JsonObject json;
|
||||
|
||||
if (!previous_json.has_value() || !previous_json.value().is_object()) {
|
||||
dbgln("Error: Could not parse JSON");
|
||||
} else {
|
||||
json = previous_json.value().as_object();
|
||||
if (!file_contents.is_empty()) {
|
||||
if (!previous_json.has_value() || !previous_json.value().is_object()) {
|
||||
dbgln("Error: Could not parse JSON");
|
||||
} else {
|
||||
json = previous_json.value().as_object();
|
||||
}
|
||||
}
|
||||
|
||||
if (flag_create) {
|
||||
|
|
Loading…
Reference in a new issue