diff --git a/Userland/Libraries/LibIPC/File.h b/Userland/Libraries/LibIPC/File.h index aae37cd3fe4..15f70a69d8e 100644 --- a/Userland/Libraries/LibIPC/File.h +++ b/Userland/Libraries/LibIPC/File.h @@ -40,9 +40,8 @@ public: { } - template - File(Core::File& file, Args... args) - : File(file.leak_fd(Badge {}), args...) + explicit File(Core::File& file) + : File(file.leak_fd(Badge {}), CloseAfterSending) { } diff --git a/Userland/Services/FileSystemAccessServer/ConnectionFromClient.cpp b/Userland/Services/FileSystemAccessServer/ConnectionFromClient.cpp index 61c937e4586..35529ea2d14 100644 --- a/Userland/Services/FileSystemAccessServer/ConnectionFromClient.cpp +++ b/Userland/Services/FileSystemAccessServer/ConnectionFromClient.cpp @@ -81,7 +81,7 @@ void ConnectionFromClient::request_file_handler(i32 request_id, i32 window_serve dbgln("FileSystemAccessServer: Couldn't open {}, error {}", path, file.error()); async_handle_prompt_end(request_id, file.error().code(), Optional {}, path); } else { - async_handle_prompt_end(request_id, 0, IPC::File(*file.release_value(), IPC::File::CloseAfterSending), path); + async_handle_prompt_end(request_id, 0, IPC::File(*file.release_value()), path); } } else { async_handle_prompt_end(request_id, EPERM, Optional {}, path); @@ -138,7 +138,7 @@ void ConnectionFromClient::prompt_helper(i32 request_id, Optional {}, Optional {}); diff --git a/Userland/Utilities/headless-browser.cpp b/Userland/Utilities/headless-browser.cpp index bb05480093c..22a967a4360 100644 --- a/Userland/Utilities/headless-browser.cpp +++ b/Userland/Utilities/headless-browser.cpp @@ -120,7 +120,7 @@ private: if (file.is_error()) client().async_handle_file_return(file.error().code(), {}, request_id); else - client().async_handle_file_return(0, IPC::File(*file.value(), IPC::File::CloseAfterSending), request_id); + client().async_handle_file_return(0, IPC::File(*file.value()), request_id); } void notify_server_did_finish_handling_input_event(bool) override { }