From: Stefan Kangas Date: Tue, 27 Sep 2022 20:58:31 +0000 (+0200) Subject: image-dired: Fix header line when file is missing X-Git-Tag: emacs-29.0.90~1856^2~183 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=42290bf8231159f5188d4b3c5861aa02f0489c61;p=emacs.git image-dired: Fix header line when file is missing * lisp/image/image-dired.el (image-dired-format-properties-string): Don't error when file has been deleted. --- diff --git a/lisp/image/image-dired.el b/lisp/image/image-dired.el index 98bb6b3c5a1..2c2f24be640 100644 --- a/lisp/image/image-dired.el +++ b/lisp/image/image-dired.el @@ -768,9 +768,11 @@ comment." 'face 'image-dired-thumb-header-file-name)) (?n . ,(propertize image-count 'face 'image-dired-thumb-header-image-count)) - (?s . ,(propertize (file-size-human-readable - (file-attribute-size - (file-attributes file))) + (?s . ,(propertize (if (file-exists-p file) + (file-size-human-readable + (file-attribute-size + (file-attributes file))) + "") 'face 'image-dired-thumb-header-file-size)) (?t . ,(or props "")) (?c . ,(or comment "")))))