mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 10:17:35 +00:00
LibCore: Make Core::File::open() return OSError in case of failure
This commit is contained in:
parent
1474a537b6
commit
13f4890c38
8 changed files with 15 additions and 15 deletions
|
@ -232,7 +232,7 @@ Result<Vector<Color>, String> PaletteWidget::load_palette_path(String const& fil
|
|||
{
|
||||
auto file_or_error = Core::File::open(file_path, Core::OpenMode::ReadOnly);
|
||||
if (file_or_error.is_error())
|
||||
return file_or_error.error();
|
||||
return String { file_or_error.error().string() };
|
||||
|
||||
auto& file = *file_or_error.value();
|
||||
return load_palette_file(file);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue