]> Sergey Matveev's repositories - nnn.git/commitdiff
Remove trailing blanks to assure .desktop suffix for xdg-mime.
authorlwnctd <astrodoe@yandex.com>
Sat, 8 Jan 2022 02:34:20 +0000 (05:34 +0300)
committerlwnctd <astrodoe@yandex.com>
Sat, 8 Jan 2022 02:34:20 +0000 (05:34 +0300)
plugins/xdgdefault

index a69e32b3b37297d3f74a8539c4cf5fb46af7110d..cf64a2f223e513590b012c65e189690cbcfd917a 100755 (executable)
@@ -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