Spreadsheet: Don't release the file buffer when importing CSV files
CSVImportDialogPage takes and holds a StringView meaning that the data was dropped instantly and displayed garbage instead.
This commit is contained in:
parent
4de99d553e
commit
bde96640ac
Notes:
sideshowbarker
2024-07-17 20:19:08 +09:00
Author: https://github.com/krkk Commit: https://github.com/SerenityOS/serenity/commit/bde96640ac Pull-request: https://github.com/SerenityOS/serenity/pull/18838 Reviewed-by: https://github.com/caoimhebyrne ✅
1 changed files with 1 additions and 1 deletions
|
@ -186,7 +186,7 @@ ErrorOr<Vector<NonnullRefPtr<Sheet>>, DeprecatedString> ImportDialog::make_and_r
|
|||
auto contents_or_error = file.read_until_eof();
|
||||
if (contents_or_error.is_error())
|
||||
return DeprecatedString::formatted("{}", contents_or_error.release_error());
|
||||
CSVImportDialogPage page { contents_or_error.release_value() };
|
||||
CSVImportDialogPage page { contents_or_error.value() };
|
||||
wizard->replace_page(page.page());
|
||||
auto result = wizard->exec();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue