mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +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:
@@ -374,7 +374,10 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
theme->write_entry("Paths", to_string(role), preview_widget.preview_palette().path(role));
|
||||
}
|
||||
|
||||
theme->sync();
|
||||
if (auto sync_result = theme->sync(); sync_result.is_error()) {
|
||||
// FIXME: Expose this to the user, since failing to save is important to know about!
|
||||
dbgln("Failed to save theme file: {}", sync_result.error());
|
||||
}
|
||||
};
|
||||
|
||||
TRY(file_menu->try_add_action(GUI::CommonActions::make_open_action([&](auto&) {
|
||||
|
||||
Reference in New Issue
Block a user