; image-dired: Fix last change

* test/lisp/image/image-dired-util-tests.el
(image-dired-thumb-name/per-directory):
* lisp/image/image-dired-util.el (image-dired-thumb-name): Fix
last change.
This commit is contained in:
Stefan Kangas 2022-09-28 14:29:11 +02:00
parent eac4e34a2c
commit 26ef0f1221
2 changed files with 4 additions and 3 deletions

View file

@ -88,7 +88,8 @@ See also `image-dired-thumbnail-storage'."
(expand-file-name (format "%s.jpg" (sha1 file))
(image-dired-dir)))
((eq 'per-directory image-dired-thumbnail-storage)
(expand-file-name (format "%s.thumb.jpg" file)
(expand-file-name (format "%s.thumb.jpg"
(file-name-nondirectory file))
(expand-file-name
".image-dired"
(file-name-directory file)))))))

View file

@ -63,9 +63,9 @@
(file-name-nondirectory (image-dired-thumb-name "foo.jpg"))
(file-name-nondirectory (image-dired-thumb-name "/tmp/foo.jpg"))))
(should (equal (file-name-split (image-dired-thumb-name "/tmp/foo.jpg"))
'("" "tmp" ".image-dired" "foo.thumb.jpg")))
'("" "tmp" ".image-dired" "foo.jpg.thumb.jpg")))
(should (equal (file-name-nondirectory
(image-dired-thumb-name "foo.jpg"))
"foo.thumb.jpg"))))
"foo.jpg.thumb.jpg"))))
;;; image-dired-util-tests.el ends here