mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-07 11:39:44 +03:00
HexEditor: Propagate HexDocumentFile creation errors in save_as()
This commit is contained in:
parent
034ec62cee
commit
8ae4464fa5
Notes:
sideshowbarker
2024-07-17 06:51:40 +09:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/SerenityOS/serenity/commit/8ae4464fa5 Pull-request: https://github.com/SerenityOS/serenity/pull/22522 Reviewed-by: https://github.com/LucasChollet ✅
@ -139,7 +139,7 @@ ErrorOr<void> HexEditor::save_as(NonnullOwnPtr<Core::File> new_file)
|
||||
} else {
|
||||
auto& memory_document = static_cast<HexDocumentMemory&>(*m_document);
|
||||
TRY(memory_document.write_to_file(*new_file));
|
||||
m_document = HexDocumentFile::create(move(new_file)).release_value_but_fixme_should_propagate_errors();
|
||||
m_document = TRY(HexDocumentFile::create(move(new_file)));
|
||||
}
|
||||
|
||||
update();
|
||||
|
Loading…
Reference in New Issue
Block a user