mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-11 10:18:15 +09: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
Notes:
sideshowbarker
2024-07-17 18:39:04 +09:00
Author: https://github.com/AtkinsSJ
Commit: cd0ffe5460
Pull-request: https://github.com/SerenityOS/serenity/pull/12317
Reviewed-by: https://github.com/sin-ack ✅
Reviewed-by: https://github.com/trflynn89
10 changed files with 39 additions and 24 deletions
|
@ -35,7 +35,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
|
||||
if (value_to_write) {
|
||||
config->write_entry(group, key, value_to_write);
|
||||
config->sync();
|
||||
TRY(config->sync());
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue