Merge remote-tracking branch 'origin/pr/233'

* origin/pr/233:
  fixed qubes.GetAppmenus ignoring some correct .desktop files
This commit is contained in:
Marek Marczykowski-Górecki 2020-06-20 15:21:24 +02:00
commit 630d94f5b2
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -60,7 +60,7 @@ find "${apps_dirs[@]}" -name '*.desktop' -print0 2>/dev/null | \
xargs -0 awk ' xargs -0 awk '
BEGINFILE { if (ERRNO) nextfile; entry="" } BEGINFILE { if (ERRNO) nextfile; entry="" }
/^\[/ { if (tolower($0) != "\[desktop entry\]") nextfile } /^\[/ { if (tolower($0) != "\[desktop entry\]") nextfile }
/^Exec=/ { entry = entry FILENAME ":Exec=qubes-desktop-run " FILENAME "\n"; next } /^Exec *=/ { entry = entry FILENAME ":Exec=qubes-desktop-run " FILENAME "\n"; next }
/^NoDisplay *= *true$/ { entry=""; nextfile } /^NoDisplay *= *true$/ { entry=""; nextfile }
/=/ { entry = entry FILENAME ":" $0 "\n" } /=/ { entry = entry FILENAME ":" $0 "\n" }
ENDFILE { print entry } ENDFILE { print entry }