From 643ecfee735f7aba92f05caa4e1eb756d9f8d66c Mon Sep 17 00:00:00 2001 From: Adam Hodgen Date: Sat, 10 Jul 2021 23:55:53 +0100 Subject: [PATCH] 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. --- Userland/Services/FileSystemAccessServer/ClientConnection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 const& user_picked_file, Core if (file.is_error()) { dbgln("FileSystemAccessServer: Couldn't open {}, error {}", user_picked_file.value(), file.error()); - return { errno, Optional {}, Optional {} }; + return { errno, Optional {}, user_picked_file.value() }; } auto maybe_permissions = m_approved_files.get(user_picked_file.value());