1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:38:11 +00:00

SystemMonitor: Don't fail if we don't have ports installed

In #9373, /usr/local/bin was added to the unveiled directories to make
symbolization work on ports. This directory only exists if at least one
port is installed, so unveil would fail with ENOENT if we had none.
This commit is contained in:
Daniel Bertalan 2021-08-13 21:00:34 +02:00 committed by Andreas Kling
parent 464dc42640
commit b2ec579e98

View file

@ -139,7 +139,8 @@ int main(int argc, char** argv)
return 1;
}
if (unveil("/usr/local/bin", "r") < 0) {
// This directory only exists if ports are installed
if (unveil("/usr/local/bin", "r") < 0 && errno != ENOENT) {
perror("unveil");
return 1;
}