diff --git a/Userland/Services/LaunchServer/Launcher.cpp b/Userland/Services/LaunchServer/Launcher.cpp index 04833a32cc..ed3baa0fd1 100644 --- a/Userland/Services/LaunchServer/Launcher.cpp +++ b/Userland/Services/LaunchServer/Launcher.cpp @@ -87,7 +87,8 @@ void Launcher::load_handlers(const String& af_dir) HashTable protocols; for (auto& protocol : af->launcher_protocols()) protocols.set(protocol); - m_handlers.set(app_executable, { Handler::Type::Default, app_name, app_executable, file_types, protocols }); + if (access(app_executable.characters(), X_OK) == 0) + m_handlers.set(app_executable, { Handler::Type::Default, app_name, app_executable, file_types, protocols }); }, af_dir); } @@ -98,6 +99,8 @@ void Launcher::load_config(const Core::ConfigFile& cfg) auto handler = cfg.read_entry("FileType", key).trim_whitespace(); if (handler.is_empty()) continue; + if (access(handler.characters(), X_OK) != 0) + continue; m_file_handlers.set(key.to_lowercase(), handler); } @@ -105,6 +108,8 @@ void Launcher::load_config(const Core::ConfigFile& cfg) auto handler = cfg.read_entry("Protocol", key).trim_whitespace(); if (handler.is_empty()) continue; + if (access(handler.characters(), X_OK) != 0) + continue; m_protocol_handlers.set(key.to_lowercase(), handler); } }