FIX mime type bugs

This commit is contained in:
Nathan Dwarshuis 2024-03-30 14:28:04 -04:00
parent cec9af4ecb
commit b18e7ac237
1 changed files with 4 additions and 3 deletions

View File

@ -302,9 +302,10 @@ desktop file exec directive."
(defun nd/get-mime-type (file) (defun nd/get-mime-type (file)
"Get the mime type of FILE." "Get the mime type of FILE."
(let* ((cmd (format "file --mime-type -b '%s'" file)) (->> (shell-quote-argument file)
(mt (shell-command-to-string cmd))) (format "file --mime-type -b %s")
(replace-regexp-in-string "\n\\'" "" mt))) (shell-command-to-string)
(s-trim)))
(defconst nd/device-mount-dirs (defconst nd/device-mount-dirs
(list (list