From 085b10679a6998fcd39acadb352747bb80aca955 Mon Sep 17 00:00:00 2001 From: Francois Fleuret Date: Sun, 20 Dec 2015 15:26:46 +0100 Subject: [PATCH] Do not crash if a local file (or directory) does not exist, just ignore. --- media.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -- 2.20.1