From 600df100df65ce620e5796f095c8ceae46e0f2fa Mon Sep 17 00:00:00 2001 From: Saswat Padhi Date: Sat, 8 Feb 2020 10:13:41 +0000 Subject: [PATCH 1/2] qubes.GetAppmenus: skip unreadable .desktop files --- qubes-rpc/qubes.GetAppmenus | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qubes-rpc/qubes.GetAppmenus b/qubes-rpc/qubes.GetAppmenus index 0a1198a..3dcec63 100755 --- a/qubes-rpc/qubes.GetAppmenus +++ b/qubes-rpc/qubes.GetAppmenus @@ -58,7 +58,7 @@ fi find "${apps_dirs[@]}" -name '*.desktop' -print0 2>/dev/null | \ xargs -0 awk ' - BEGINFILE { entry="" } + BEGINFILE {if (ERRNO) nextfile; entry="" } /^\[/ { if (tolower($0) != "\[desktop entry\]") nextfile } /^Exec=/ { entry = entry FILENAME ":Exec=qubes-desktop-run " FILENAME "\n"; next } /^NoDisplay *= *true$/ { entry=""; nextfile } From f96c00d97537a1d95c509e01684c2c98549d8268 Mon Sep 17 00:00:00 2001 From: Saswat Padhi Date: Sat, 8 Feb 2020 04:01:48 -0800 Subject: [PATCH 2/2] signed --- qubes-rpc/qubes.GetAppmenus | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qubes-rpc/qubes.GetAppmenus b/qubes-rpc/qubes.GetAppmenus index 3dcec63..6712c51 100755 --- a/qubes-rpc/qubes.GetAppmenus +++ b/qubes-rpc/qubes.GetAppmenus @@ -58,7 +58,7 @@ fi find "${apps_dirs[@]}" -name '*.desktop' -print0 2>/dev/null | \ xargs -0 awk ' - BEGINFILE {if (ERRNO) nextfile; entry="" } + BEGINFILE { if (ERRNO) nextfile; entry="" } /^\[/ { if (tolower($0) != "\[desktop entry\]") nextfile } /^Exec=/ { entry = entry FILENAME ":Exec=qubes-desktop-run " FILENAME "\n"; next } /^NoDisplay *= *true$/ { entry=""; nextfile }