瀏覽代碼

LibFileSystemAccessClient: Return an errno instead of a string literal

Returning an errno to ease error transmission over IPC.
Lucas CHOLLET 3 年之前
父節點
當前提交
deb525fd9d
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Userland/Libraries/LibFileSystemAccessClient/Client.cpp

+ 1 - 1
Userland/Libraries/LibFileSystemAccessClient/Client.cpp

@@ -146,7 +146,7 @@ void Client::handle_prompt_end(i32 request_id, i32 error, Optional<IPC::File> co
 
     if (file->is_directory()) {
         GUI::MessageBox::show_error(request_data.parent_window, String::formatted("Opening \"{}\" failed: Cannot open directory", *chosen_file));
-        request_data.promise->resolve(Error::from_string_literal("Cannot open directory"sv));
+        request_data.promise->resolve(Error::from_errno(EISDIR));
         return;
     }