@@ -441,16 +441,17 @@ export_application()
441
441
fi
442
442
unset IFS
443
443
444
- # In this phase we search for applications to export.
445
- # First find command will grep through all files in the canonical directories
446
- # and only list files that contain the $exported_app, excluding those that
447
- # already contains a distrobox-enter command. So skipping already exported apps.
448
- # Second find will list all files that contain the name specified, so that
449
- # it is possible to export an app not only by its executable name but also
450
- # by its launcher name.
444
+ # In this phase we search for applications to export. First find command
445
+ # will grep through all files in the canonical directories, resolving
446
+ # symbolic links and only listing files that contain the $exported_app,
447
+ # excluding those that already contains a distrobox-enter command. So
448
+ # skipping already exported apps. Second find will list all files that
449
+ # contain the name specified, so that it is possible to export an app
450
+ # not only by its executable name but also by its launcher name.
451
451
desktop_files=$(
452
452
# shellcheck disable=SC2086
453
453
find ${canon_dirs} -type f -print -o -type l -print | sed ' s/./\\&/g' |
454
+ xargs -I{} readlink -e " {}" | sed ' s/./\\&/g' |
454
455
xargs -I{} grep -l -e " Exec=.*${exported_app} .*" -e " Name=.*${exported_app} .*" " {}" | sed ' s/./\\&/g' |
455
456
xargs -I{} grep -L -e " Exec=.*${DISTROBOX_ENTER_PATH:- " distrobox.*enter" } .*" " {}" | sed ' s/./\\&/g' |
456
457
xargs -I{} printf " %s¤" " {}"
0 commit comments