diff --git a/etc/conf.org b/etc/conf.org index 5f2ffcd..43281b9 100644 --- a/etc/conf.org +++ b/etc/conf.org @@ -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