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

Minesweeper+Snake: load config file before calling unveil()

This commit is contained in:
Brendan Coles 2020-11-04 11:49:50 +00:00 committed by Andreas Kling
parent 0603402c80
commit e558f6b184
3 changed files with 12 additions and 4 deletions

View file

@ -51,13 +51,13 @@ int main(int argc, char** argv)
return 1;
}
auto config = Core::ConfigFile::get_for_app("Snake");
if (unveil("/res", "r") < 0) {
perror("unveil");
return 1;
}
auto config = Core::ConfigFile::get_for_app("Snake");
if (unveil(config->file_name().characters(), "crw") < 0) {
perror("unveil");
return 1;