소스 검색

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.
Adam Hodgen 4 년 전
부모
커밋
643ecfee73
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      Userland/Services/FileSystemAccessServer/ClientConnection.cpp

+ 1 - 1
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());