summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Hodgen <ant1441@gmail.com>2021-07-10 23:55:53 +0100
committerGunnar Beutner <gunnar@beutner.name>2021-07-11 09:46:50 +0200
commit643ecfee735f7aba92f05caa4e1eb756d9f8d66c (patch)
treeb2c2400c332aa870b9c5f34632c920938624b923
parentc9f6786e8b726dfe3d8d4ee13e34be561c093fe5 (diff)
downloadserenity-643ecfee735f7aba92f05caa4e1eb756d9f8d66c.zip
FileSystemAccessServer: Return user_picked_value even on error
If a user picks a file which can't be opened for some reason, we should still return the value, so client applications can report the error along with the chosen filepath.
-rw-r--r--Userland/Services/FileSystemAccessServer/ClientConnection.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Services/FileSystemAccessServer/ClientConnection.cpp b/Userland/Services/FileSystemAccessServer/ClientConnection.cpp
index 3c5979f22b..d863a22c47 100644
--- a/Userland/Services/FileSystemAccessServer/ClientConnection.cpp
+++ b/Userland/Services/FileSystemAccessServer/ClientConnection.cpp
@@ -122,7 +122,7 @@ T ClientConnection::prompt_helper(Optional<String> const& user_picked_file, Core
if (file.is_error()) {
dbgln("FileSystemAccessServer: Couldn't open {}, error {}", user_picked_file.value(), file.error());
- return { errno, Optional<IPC::File> {}, Optional<String> {} };
+ return { errno, Optional<IPC::File> {}, user_picked_file.value() };
}
auto maybe_permissions = m_approved_files.get(user_picked_file.value());