HexEditor: Propagate HexDocumentFile creation errors in save_as()

This commit is contained in:
Sam Atkins 2023-12-31 17:18:04 +00:00 committed by Sam Atkins
parent 034ec62cee
commit 8ae4464fa5
Notes: sideshowbarker 2024-07-17 06:51:40 +09:00

View File

@ -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();