From: Francois Fleuret Date: Sun, 20 Dec 2015 14:26:46 +0000 (+0100) Subject: Do not crash if a local file (or directory) does not exist, just ignore. X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=commitdiff_plain;h=085b10679a6998fcd39acadb352747bb80aca955;p=elisp.git Do not crash if a local file (or directory) does not exist, just ignore. --- diff --git a/media.el b/media.el index c2dd4e7..d380970 100644 --- a/media.el +++ b/media.el @@ -620,9 +620,11 @@ returns nil if no id3 tags could be found." (title (or (and (consp c) (cdr c)) url))) (if (string-match "^\\(http\\|mms\\)://" url) (media/insert-url (cons url title) 0) - (if (file-regular-p url) (media/insert-file url 0) - (if (file-directory-p url) (media/insert-dir url 0) - (error "Unknown type `%s'" url)))))) + (if (file-exists-p url) + (if (file-regular-p url) (media/insert-file url 0) + (if (file-directory-p url) (media/insert-dir url 0) + (error "Unknown type `%s'" url)))) + ))) list)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;