From: Stefan Kangas Date: Wed, 3 Nov 2021 01:45:36 +0000 (+0100) Subject: image-dired: Signal error if file is missing on display X-Git-Tag: emacs-29.0.90~3671^2~275 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=09a38b021b7af7b45f0fcbe286550c1cf33bfa3b;p=emacs.git image-dired: Signal error if file is missing on display * lisp/image-dired.el (image-dired-display-image): Signal error if file is missing. --- diff --git a/lisp/image-dired.el b/lisp/image-dired.el index 9cfe4318cfd..07f6c23c8b0 100644 --- a/lisp/image-dired.el +++ b/lisp/image-dired.el @@ -2040,6 +2040,8 @@ original size." (window (image-dired-display-window)) (image-type 'jpeg)) (setq file (expand-file-name file)) + (when (not (file-exists-p file)) + (error "No such file: %s" file)) (if (not original-size) (let* ((spec (list