]> git.eshelyaron.com Git - emacs.git/commitdiff
image-dired: Use MD5 for thumb filename generation
authorStefan Kangas <stefan@marxist.se>
Fri, 14 Jan 2022 15:17:33 +0000 (16:17 +0100)
committerStefan Kangas <stefan@marxist.se>
Fri, 14 Jan 2022 15:18:34 +0000 (16:18 +0100)
* lisp/image-dired.el (image-dired-thumb-name): Revert back to MD5 for
file name generation to preserve backwards-compatibility.  (Bug#53229)

lisp/image-dired.el

index 536f29441ae76a5fd7d2b056c749cd001ebf9999..b81df8567bd4436f5ffe14fee1489dfb6a54dcd5 100644 (file)
@@ -609,9 +609,7 @@ See also `image-dired-thumbnail-storage'."
         ((eq 'use-image-dired-dir image-dired-thumbnail-storage)
          (let* ((f (expand-file-name file))
                 (hash
-                 ;; SHA1 is slightly faster than MD5, so let's use it.
-                 ;; (We don't need anything crytographically strong.)
-                 (sha1 (file-name-as-directory (file-name-directory f)))))
+                 (md5 (file-name-as-directory (file-name-directory f)))))
            (format "%s%s%s.thumb.%s"
                    (file-name-as-directory (expand-file-name (image-dired-dir)))
                    (file-name-base f)