diff options
author | Stefan Kangas <stefankangas@gmail.com> | 2022-09-28 00:41:01 +0200 |
---|---|---|
committer | Stefan Kangas <stefankangas@gmail.com> | 2022-09-28 12:36:42 +0200 |
commit | 6cffaa3b6daf767808a9d9ae549fc2aea5c5c07e (patch) | |
tree | 6e7eb37733a87b8eabb2ba1b3657b329825ce4ba /test/lisp | |
parent | b5b59d1b8afe1e13f63190b9688ddfd9605f2945 (diff) | |
download | emacs-6cffaa3b6daf767808a9d9ae549fc2aea5c5c07e.tar.gz emacs-6cffaa3b6daf767808a9d9ae549fc2aea5c5c07e.tar.bz2 emacs-6cffaa3b6daf767808a9d9ae549fc2aea5c5c07e.zip |
image-dired: End thumbnail file names with ".jpg"
* lisp/image/image-dired-util.el (image-dired-thumb-name): Always
end thumbnail name in ".jpg" and simplify naming to just use the
SHA-1 hash. (Bug#57961)
* test/lisp/image/image-dired-util-tests.el
(image-dired-thumb-name/image-dired): Adjust test for the above
change.
* etc/NEWS: Announce the above change.
Diffstat (limited to 'test/lisp')
-rw-r--r-- | test/lisp/image/image-dired-util-tests.el | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/lisp/image/image-dired-util-tests.el b/test/lisp/image/image-dired-util-tests.el index 9fb457dd36e..cd371ef61ac 100644 --- a/test/lisp/image/image-dired-util-tests.el +++ b/test/lisp/image/image-dired-util-tests.el @@ -48,9 +48,12 @@ (file-name-directory (image-dired-thumb-name "foo.jpg")) (file-name-directory (image-dired-thumb-name "/tmp/foo.jpg")))) (should (equal (file-name-nondirectory - ;; The checksum is based on the directory name. + ;; The checksum is based on the file name. (image-dired-thumb-name "/some/path/foo.jpg")) - "foo_45fff7fcc4a0945679b7b11dec36a82d.thumb.jpg"))))) + "dc4e6f7068157023e7f2e8362d15bdd2e3ca89e4.jpg")) + (should (equal (file-name-extension + (image-dired-thumb-name "foo.gif")) + "jpg"))))) (ert-deftest image-dired-thumb-name/per-directory () (let ((image-dired-thumbnail-storage 'per-directory)) |