FIX mime type matching

This commit is contained in:
Nathan Dwarshuis 2024-03-11 13:00:38 -04:00
parent 8e7f54fea6
commit 810f759d1c
1 changed files with 2 additions and 1 deletions

View File

@ -272,7 +272,8 @@ OS is one of those in `system-type'."
"Return all applications that can open a given MIMETYPE.
The list is comprised of alists where pairs are of the form (name . command)."
(let ((case-fold-search nil)
(mime-regex (format "^MimeType=.*%s;?.*$" mimetype)))
(mime-regex (->> (regexp-quote mimetype)
(format "^MimeType=.*%s;?.*$"))))
(->> (list "/usr/share/applications"
"/usr/local/share/applications"
"~/.local/share/applications")