summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChih-Hsuan Yen <2293-yan12125@users.noreply.gitlab.freedesktop.org>2021-11-13 16:12:07 +0800
committerChih-Hsuan Yen <645432-yan12125@users.noreply.gitlab.com>2023-09-29 22:24:37 +0800
commitf38b8bbea064a0c2c5f42a1a9485b4f0c9e83aae (patch)
tree28c4a3e3ee80b50717d16c5d07de7513b56221ae
parentf8bc7454112899413a60996b7b5d9aebfa4e6864 (diff)
xdg-mime: actually handle lists in mimeapps.list correctly
The issue was raised in [1]. The earlier fix [2] makes xdg-mime always pick the first item from a list, and that differs from the standard [3]. > If the application is no longer installed, the next application in the > list is attempted, and so on. A latter fix [4] implements the standard-compliant behavior, while it does not actually work until [2] is reverted. [1] https://bugs.freedesktop.org/show_bug.cgi?id=44163 [2] https://gitlab.freedesktop.org/xdg/xdg-utils/-/commit/a5ec775d7631bf32760acc1c1b54a4905cfdec89 [3] https://specifications.freedesktop.org/mime-apps-spec/1.0.1/ar01s04.html [4] https://gitlab.freedesktop.org/xdg/xdg-utils/-/commit/1f8e58d51e6fb3f50f59ed2d8265f2f346ac68e6
-rw-r--r--scripts/xdg-mime.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/xdg-mime.in b/scripts/xdg-mime.in
index 6302606..0a6c9e9 100644
--- a/scripts/xdg-mime.in
+++ b/scripts/xdg-mime.in
@@ -416,7 +416,7 @@ check_mimeapps_list()
found=1
}
}
-' "$mimeapps_list" | cut -d ';' -f 1)"
+' "$mimeapps_list")"
if [ -n "$result" ]; then
# $result could be a ; separated list of .desktop files
# use the first on the system