Skip to content

Commit

Permalink
Don't bother to sniff for mime-type on windows and ms-dos
Browse files Browse the repository at this point in the history
  • Loading branch information
Vincent Geddes committed Dec 9, 2013
1 parent f501718 commit 362b8f4
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions bbdb-vcard.el
Expand Up @@ -1163,15 +1163,17 @@ The inverse function of `bbdb-split'."
string))

(defun bbdb-vcard-sniff-mime-type (data)
(with-temp-buffer
(insert data)
(if (zerop (call-process-region 1
(+ 1 (buffer-size))
"file"
t t nil
"-b" "--mime-type" "-"))
(bbdb-vcard-string-chomp (buffer-string))
nil)))
(if (not (member system-type '("windows-nt" "ms-dos")))
(with-temp-buffer
(insert data)
(if (zerop (call-process-region 1
(+ 1 (buffer-size))
"file"
t t nil
"-b" "--mime-type" "-"))
(bbdb-vcard-string-chomp (buffer-string))
nil))
nil))

(defun bbdb-vcard-import-inline-media (vcard-media)
"imports inline binary content and saves it to disk."
Expand Down

0 comments on commit 362b8f4

Please sign in to comment.