From: Stefan Kangas Date: Wed, 28 Sep 2022 12:29:11 +0000 (+0200) Subject: ; image-dired: Fix last change X-Git-Tag: emacs-29.0.90~1856^2~168 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=26ef0f122175549174ad940b63a7074e80740836;p=emacs.git ; 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. --- 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