]> git.eshelyaron.com Git - emacs.git/commitdiff
image-dired: Signal error if file is missing on display
authorStefan Kangas <stefan@marxist.se>
Wed, 3 Nov 2021 01:45:36 +0000 (02:45 +0100)
committerStefan Kangas <stefan@marxist.se>
Wed, 3 Nov 2021 04:10:24 +0000 (05:10 +0100)
* lisp/image-dired.el (image-dired-display-image): Signal error if
file is missing.

lisp/image-dired.el

index 9cfe4318cfda401ce7643ae2c7f374913eb68f73..07f6c23c8b01919816ae8b3a74569cbbbb0e59b1 100644 (file)
@@ -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