1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:37:46 +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:
Andreas Kling 2021-02-21 10:56:26 +01:00
parent 3b3e7d3f46
commit 2a22d346dc

View file

@ -80,10 +80,12 @@ int main(int argc, char** argv)
JsonObject json; JsonObject json;
if (!previous_json.has_value() || !previous_json.value().is_object()) { if (!file_contents.is_empty()) {
dbgln("Error: Could not parse JSON"); if (!previous_json.has_value() || !previous_json.value().is_object()) {
} else { dbgln("Error: Could not parse JSON");
json = previous_json.value().as_object(); } else {
json = previous_json.value().as_object();
}
} }
if (flag_create) { if (flag_create) {