]> git.eshelyaron.com Git - emacs.git/commitdiff
; image-dired: Fix last change
authorStefan Kangas <stefankangas@gmail.com>
Wed, 28 Sep 2022 12:29:11 +0000 (14:29 +0200)
committerStefan Kangas <stefankangas@gmail.com>
Wed, 28 Sep 2022 12:29:11 +0000 (14:29 +0200)
* 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
test/lisp/image/image-dired-util-tests.el

index dd746886a43b24312da5e0b28971c429d35bc5a4..bc7a35526203a0ab60ea4f9ccd1c45fbce08f21d 100644 (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)))))))
index cd371ef61ac0ca4e6d358681ed89809b10dc5e7d..63d42f56deab7df678d93362a822560196aa38db 100644 (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