浏览代码

fixed qubes.GetAppmenus ignoring some correct .desktop files

.desktop files can have spaces around '=' symbols; previously
GetAppmenus discarded such files.

references QubesOS/qubes-issues#5692
Marta Marczykowska-Górecka 4 年之前
父节点
当前提交
6e724f76f0
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      qubes-rpc/qubes.GetAppmenus

+ 1 - 1
qubes-rpc/qubes.GetAppmenus

@@ -60,7 +60,7 @@ find "${apps_dirs[@]}" -name '*.desktop' -print0 2>/dev/null | \
          xargs -0 awk '
          BEGINFILE { if (ERRNO) nextfile; entry="" }
          /^\[/ { 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 }
          /=/ { entry = entry FILENAME ":" $0 "\n" }
          ENDFILE { print entry }