Proposed solution for issue #1657

qvm-sync-appmenus fails when a shortcut have spaces in the file name #1657
This commit is contained in:
adrianx64 2016-01-18 23:02:30 -06:00
parent fb470fe86f
commit d3966b0f6c

View File

@ -1,5 +1,5 @@
find /usr/share/applications/ /usr/local/share/applications/ -name '*.desktop' 2>/dev/null | \ find /usr/share/applications/ /usr/local/share/applications/ -name '*.desktop' -print0 2>/dev/null | \
xargs awk ' xargs -0 awk '
BEGINFILE { entry="" } BEGINFILE { 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 }