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.
This commit is contained in:
Stefan Kangas 2022-09-27 22:58:31 +02:00
parent e638aaf6e8
commit 42290bf823

View file

@ -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)))
"<File missing>")
'face 'image-dired-thumb-header-file-size))
(?t . ,(or props ""))
(?c . ,(or comment "")))))