summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorLucas CHOLLET <lucas.chollet@free.fr>2023-03-22 15:57:52 -0400
committerAndreas Kling <kling@serenityos.org>2023-03-22 23:21:20 +0100
commitfd0b809d541fd5c02b7d602e0722c56c8fa71dff (patch)
treedbbc6f8de09c6b9c7b8631a726abfcd70cd0e793 /Userland
parent0d46c277418416a5a0f78e7ac5df493fe16c65fd (diff)
downloadserenity-fd0b809d541fd5c02b7d602e0722c56c8fa71dff.zip
Spreadsheet: Port to Core::File
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Applications/Spreadsheet/Spreadsheet.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Applications/Spreadsheet/Spreadsheet.cpp b/Userland/Applications/Spreadsheet/Spreadsheet.cpp
index e42cd6a2e9..94e329f367 100644
--- a/Userland/Applications/Spreadsheet/Spreadsheet.cpp
+++ b/Userland/Applications/Spreadsheet/Spreadsheet.cpp
@@ -16,7 +16,7 @@
#include <AK/ScopeGuard.h>
#include <AK/TemporaryChange.h>
#include <AK/URL.h>
-#include <LibCore/DeprecatedFile.h>
+#include <LibCore/File.h>
#include <LibJS/Interpreter.h>
#include <LibJS/Parser.h>
#include <LibJS/Runtime/AbstractOperations.h>
@@ -49,9 +49,9 @@ Sheet::Sheet(Workbook& workbook)
// Sadly, these have to be evaluated once per sheet.
constexpr auto runtime_file_path = "/res/js/Spreadsheet/runtime.js"sv;
- auto file_or_error = Core::DeprecatedFile::open(runtime_file_path, Core::OpenMode::ReadOnly);
+ auto file_or_error = Core::File::open(runtime_file_path, Core::File::OpenMode::Read);
if (!file_or_error.is_error()) {
- auto buffer = file_or_error.value()->read_all();
+ auto buffer = file_or_error.value()->read_until_eof().release_value_but_fixme_should_propagate_errors();
auto script_or_error = JS::Script::parse(buffer, interpreter().realm(), runtime_file_path);
if (script_or_error.is_error()) {
warnln("Spreadsheet: Failed to parse runtime code");