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)
"Get the mime type of FILE."
(let* ((cmd (format "file --mime-type -b '%s'" file))
(mt (shell-command-to-string cmd)))
(replace-regexp-in-string "\n\\'" "" mt)))
(->> (shell-quote-argument file)
(format "file --mime-type -b %s")
(shell-command-to-string)
(s-trim)))
(defconst nd/device-mount-dirs
(list