summaryrefslogtreecommitdiff
path: root/Userland/Applications/3DFileViewer
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-05-20 17:30:00 +0200
committerAndreas Kling <kling@serenityos.org>2021-05-20 17:52:38 +0200
commitdf5f382b502fe18dd7762bd8ab830833bd22a5f6 (patch)
tree8b4980babe5ed34590af861ef69f91b595eef311 /Userland/Applications/3DFileViewer
parent5419e2b510a9288f1fa23e2a84d5894b96c65edb (diff)
downloadserenity-df5f382b502fe18dd7762bd8ab830833bd22a5f6.zip
3DFileViewer: Remove unveil() calls and add "thread" pledge
An application that allows opening arbitrary files from the filesystem needs to allow itself to access the filesystem, otherwise there's no point in supporting the feature. :^) And the "thread" pledge is needed for background thumbnail generation.
Diffstat (limited to 'Userland/Applications/3DFileViewer')
-rw-r--r--Userland/Applications/3DFileViewer/main.cpp17
1 files changed, 1 insertions, 16 deletions
diff --git a/Userland/Applications/3DFileViewer/main.cpp b/Userland/Applications/3DFileViewer/main.cpp
index eca71032eb..b06bb91b8c 100644
--- a/Userland/Applications/3DFileViewer/main.cpp
+++ b/Userland/Applications/3DFileViewer/main.cpp
@@ -124,26 +124,11 @@ int main(int argc, char** argv)
{
auto app = GUI::Application::construct(argc, argv);
- if (pledge("stdio recvfd sendfd rpath", nullptr) < 0) {
+ if (pledge("stdio thread recvfd sendfd rpath", nullptr) < 0) {
perror("pledge");
return 1;
}
- if (unveil("/res", "r") < 0) {
- perror("unveil");
- return 1;
- }
-
- if (unveil("/home", "r") < 0) {
- perror("unveil");
- return 1;
- }
-
- if (unveil(nullptr, nullptr) < 0) {
- perror("unveil");
- return 1;
- }
-
// Construct the main window
auto window = GUI::Window::construct();
auto app_icon = GUI::Icon::default_icon("app-3d-file-viewer");