Remove trailing blanks to assure .desktop suffix for xdg-mime.

This commit is contained in:
lwnctd 2022-01-08 05:34:20 +03:00
parent 2eadf35fa0
commit 49aa4dabf1
1 changed files with 1 additions and 1 deletions

View File

@ -49,5 +49,5 @@ app=$(find "$@" -iname '*.desktop' -exec grep '^Name=' {} + \
| cut -f 2)
if [ -n "$app" ]; then
xdg-mime default "$app" "$ftype"
xdg-mime default "${app%%[[:blank:]]*}" "$ftype"
fi