mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:27:43 +00:00
WidgetGallery: Port file picker to use FileSystemAccessClient
Previously we would unveil the home directory of anon to allow showing anything in the file picker. This patch removes direct access to the home directory and instead makes WidgetGallery connect to FileSystemAccessServer to open a file, making the application more user agnostic and allowing directories outside /home/anon to be shown.
This commit is contained in:
parent
08f465a47d
commit
1346a653e4
3 changed files with 6 additions and 6 deletions
|
@ -17,9 +17,8 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
TRY(Core::System::pledge("stdio recvfd sendfd rpath unix thread"));
|
||||
auto app = TRY(GUI::Application::try_create(arguments, Core::EventLoop::MakeInspectable::Yes));
|
||||
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd rpath thread"));
|
||||
TRY(Core::System::unveil("/res", "r"));
|
||||
TRY(Core::System::unveil("/home/anon", "r"));
|
||||
TRY(Core::System::unveil("/tmp/user/%uid/portal/filesystemaccess", "rw"));
|
||||
TRY(Core::System::unveil("/etc/FileIconProvider.ini", "r"));
|
||||
TRY(Core::System::unveil(nullptr, nullptr));
|
||||
auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-widget-gallery"sv));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue