mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:57:44 +00:00
LibCore+Everywhere: Return ErrorOr from ConfigFile::sync()
Currently this method always succeeds, but that won't be true once we switch to the Core::Stream API. :^) Some of these places would ideally show an error message to the user, since failure to save a file is significant, but let's not get distracted right now.
This commit is contained in:
parent
b90dc408bd
commit
cd0ffe5460
10 changed files with 39 additions and 24 deletions
|
@ -271,7 +271,7 @@ bool ScreenLayout::save_config(Core::ConfigFile& config_file, bool sync) const
|
|||
config_file.remove_group(group_name);
|
||||
}
|
||||
|
||||
if (sync && !config_file.sync())
|
||||
if (sync && config_file.sync().is_error())
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue