1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:27:35 +00:00

FileSystemAccessServer: Don't transmit unused data

The server cannot use these values anywhere, because this method always
sets 'prompt = ShouldPrompt::No'. This saves a bunch of roundtrips for
all clients that use FSAS to read abritrary files.
This commit is contained in:
Ben Wiederhake 2023-05-26 19:48:45 +02:00 committed by Jelle Raaijmakers
parent 5857f24bc8
commit 8df7b42078
5 changed files with 8 additions and 17 deletions

View file

@ -49,7 +49,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
auto main_widget = TRY(window->set_main_widget<ThemeEditor::MainWidget>());
if (path.has_value()) {
// Note: This is deferred to ensure that the window has already popped and thus proper window stealing can be performed.
// Note: This is deferred to ensure that the window has already popped and any error dialog boxes would show up correctly.
app->event_loop().deferred_invoke(
[&window, &path, &main_widget]() {
auto response = FileSystemAccessClient::Client::the().request_file_read_only_approved(window, path.value().to_deprecated_string());