mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:57:45 +00:00
LibDesktop: Make allowlist APIs return ErrorOr<void>
This makes it very smooth to use TRY() when setting up these lists, as you can see in the rest of this commit. :^)
This commit is contained in:
parent
4a64bb80ea
commit
b6f49924be
8 changed files with 34 additions and 76 deletions
|
@ -54,11 +54,8 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
// Connect to LaunchServer immediately and let it know that we won't ask for anything other than opening
|
||||
// the user's downloads directory.
|
||||
// FIXME: This should go away with a standalone download manager at some point.
|
||||
if (!Desktop::Launcher::add_allowed_url(URL::create_with_file_protocol(Core::StandardPaths::downloads_directory()))
|
||||
|| !Desktop::Launcher::seal_allowlist()) {
|
||||
warnln("Failed to set up allowed launch URLs");
|
||||
return 1;
|
||||
}
|
||||
TRY(Desktop::Launcher::add_allowed_url(URL::create_with_file_protocol(Core::StandardPaths::downloads_directory())));
|
||||
TRY(Desktop::Launcher::seal_allowlist());
|
||||
|
||||
TRY(Core::System::unveil("/home", "rwc"));
|
||||
TRY(Core::System::unveil("/res", "r"));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue