summaryrefslogtreecommitdiff
path: root/Userland/Applications/Spreadsheet
diff options
context:
space:
mode:
authorTim Schumacher <timschumi@gmx.de>2022-12-07 21:34:00 +0100
committerSam Atkins <atkinssj@gmail.com>2022-12-08 12:52:14 +0000
commit2fc2025f49bb974a46afdf2242489ab0fe5a5cba (patch)
treee7565af2a4b432991c70180b9a7e7f90b2dc3e0b /Userland/Applications/Spreadsheet
parentbd272e638cc33e3282ffde1052eafd15cd00eac5 (diff)
downloadserenity-2fc2025f49bb974a46afdf2242489ab0fe5a5cba.zip
LibCore: Move `Core::Stream::File::exists()` to `Core::File`
`Core::Stream::File` shouldn't hold any utility methods that are unrelated to constructing a `Core::Stream`, so let's just replace the existing `Core::File::exists` with the nicer looking implementation.
Diffstat (limited to 'Userland/Applications/Spreadsheet')
-rw-r--r--Userland/Applications/Spreadsheet/main.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Applications/Spreadsheet/main.cpp b/Userland/Applications/Spreadsheet/main.cpp
index f575dada40..f95591f790 100644
--- a/Userland/Applications/Spreadsheet/main.cpp
+++ b/Userland/Applications/Spreadsheet/main.cpp
@@ -38,7 +38,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
args_parser.parse(arguments);
if (filename) {
- if (!Core::File::exists(filename) || Core::File::is_directory(filename)) {
+ if (!Core::File::exists({ filename, strlen(filename) }) || Core::File::is_directory(filename)) {
warnln("File does not exist or is a directory: {}", filename);
return 1;
}