summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibFileSystemAccessClient
diff options
context:
space:
mode:
authorCameron Youell <cameronyouell@gmail.com>2023-03-22 02:35:30 +1100
committerLinus Groh <mail@linusgroh.de>2023-03-21 19:03:21 +0000
commit1d24f394c61d8e2af216c95303014d0554165f72 (patch)
treee577780754109c9b38a81cfc815d35f19c68eb9d /Userland/Libraries/LibFileSystemAccessClient
parentedab0cbf41d80e805fe93ee0c4cc5021a1e599c1 (diff)
downloadserenity-1d24f394c61d8e2af216c95303014d0554165f72.zip
Everywhere: Use `LibFileSystem` where trivial
Diffstat (limited to 'Userland/Libraries/LibFileSystemAccessClient')
-rw-r--r--Userland/Libraries/LibFileSystemAccessClient/CMakeLists.txt2
-rw-r--r--Userland/Libraries/LibFileSystemAccessClient/Client.cpp5
2 files changed, 4 insertions, 3 deletions
diff --git a/Userland/Libraries/LibFileSystemAccessClient/CMakeLists.txt b/Userland/Libraries/LibFileSystemAccessClient/CMakeLists.txt
index 87c8ccea06..7d0b4537b5 100644
--- a/Userland/Libraries/LibFileSystemAccessClient/CMakeLists.txt
+++ b/Userland/Libraries/LibFileSystemAccessClient/CMakeLists.txt
@@ -8,5 +8,5 @@ set(GENERATED_SOURCES
)
serenity_lib(LibFileSystemAccessClient filesystemaccessclient)
-target_link_libraries(LibFileSystemAccessClient PRIVATE LibCore LibIPC)
+target_link_libraries(LibFileSystemAccessClient PRIVATE LibCore LibFileSystem LibIPC)
add_dependencies(LibFileSystemAccessClient WindowServer)
diff --git a/Userland/Libraries/LibFileSystemAccessClient/Client.cpp b/Userland/Libraries/LibFileSystemAccessClient/Client.cpp
index e4c7f18567..ea4af7a457 100644
--- a/Userland/Libraries/LibFileSystemAccessClient/Client.cpp
+++ b/Userland/Libraries/LibFileSystemAccessClient/Client.cpp
@@ -7,6 +7,7 @@
#include <AK/LexicalPath.h>
#include <LibCore/DeprecatedFile.h>
+#include <LibFileSystem/FileSystem.h>
#include <LibFileSystemAccessClient/Client.h>
#include <LibGUI/ConnectionToWindowServer.h>
#include <LibGUI/MessageBox.h>
@@ -128,13 +129,13 @@ void Client::handle_prompt_end(i32 request_id, i32 error, Optional<IPC::File> co
return;
}
- if (Core::DeprecatedFile::is_device(ipc_file->fd())) {
+ if (FileSystem::is_device(*chosen_file)) {
GUI::MessageBox::show_error(request_data.parent_window, DeprecatedString::formatted("Opening \"{}\" failed: Cannot open device files", *chosen_file));
request_data.promise->resolve(Error::from_string_literal("Cannot open device files")).release_value_but_fixme_should_propagate_errors();
return;
}
- if (Core::DeprecatedFile::is_directory(ipc_file->fd())) {
+ if (FileSystem::is_directory(*chosen_file)) {
GUI::MessageBox::show_error(request_data.parent_window, DeprecatedString::formatted("Opening \"{}\" failed: Cannot open directory", *chosen_file));
request_data.promise->resolve(Error::from_errno(EISDIR)).release_value_but_fixme_should_propagate_errors();
return;