From 26ef0f122175549174ad940b63a7074e80740836 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Wed, 28 Sep 2022 14:29:11 +0200 Subject: [PATCH] ; 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. --- lisp/image/image-dired-util.el | 3 ++- test/lisp/image/image-dired-util-tests.el | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/image/image-dired-util.el b/lisp/image/image-dired-util.el index dd746886a43..bc7a3552620 100644 --- a/lisp/image/image-dired-util.el +++ b/lisp/image/image-dired-util.el @@ -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))))))) diff --git a/test/lisp/image/image-dired-util-tests.el b/test/lisp/image/image-dired-util-tests.el index cd371ef61ac..63d42f56dea 100644 --- a/test/lisp/image/image-dired-util-tests.el +++ b/test/lisp/image/image-dired-util-tests.el @@ -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 -- 2.39.2