From: lwnctd Date: Sat, 8 Jan 2022 02:34:20 +0000 (+0300) Subject: Remove trailing blanks to assure .desktop suffix for xdg-mime. X-Git-Tag: v4.5~37^2 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=49aa4dabf1ab8b01d346c52fb5cb58a10c9a49fd;p=nnn.git Remove trailing blanks to assure .desktop suffix for xdg-mime. --- diff --git a/plugins/xdgdefault b/plugins/xdgdefault index a69e32b3..cf64a2f2 100755 --- a/plugins/xdgdefault +++ b/plugins/xdgdefault @@ -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