mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 08:27:45 +00:00
Taskbar: Check if executable in .af exist in filesystem
This adds access X_OK check in discover_apps_and_categories() to see executable specified in .af files exist before registering them for start menu.
This commit is contained in:
parent
8a3c9d9851
commit
3d42297ecd
1 changed files with 4 additions and 2 deletions
|
@ -87,8 +87,10 @@ Vector<String> discover_apps_and_categories()
|
||||||
{
|
{
|
||||||
HashTable<String> seen_app_categories;
|
HashTable<String> seen_app_categories;
|
||||||
Desktop::AppFile::for_each([&](auto af) {
|
Desktop::AppFile::for_each([&](auto af) {
|
||||||
g_apps.append({ af->executable(), af->name(), af->category() });
|
if (access(af->executable().characters(), X_OK) == 0) {
|
||||||
seen_app_categories.set(af->category());
|
g_apps.append({ af->executable(), af->name(), af->category() });
|
||||||
|
seen_app_categories.set(af->category());
|
||||||
|
}
|
||||||
});
|
});
|
||||||
quick_sort(g_apps, [](auto& a, auto& b) { return a.name < b.name; });
|
quick_sort(g_apps, [](auto& a, auto& b) { return a.name < b.name; });
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue