aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Oteiza2016-12-14 14:34:21 -0500
committerMark Oteiza2016-12-14 14:34:21 -0500
commit66ccc65935c389942f1bc72e968846d8dab9951b (patch)
tree42d80d45d73e8b7127291ef665fc35105c09a680
parent44a77d34c63fb4188edca6e1a875c9a1ec01f3f7 (diff)
downloademacs-66ccc65935c389942f1bc72e968846d8dab9951b.tar.gz
emacs-66ccc65935c389942f1bc72e968846d8dab9951b.zip
Update standard image-dired thumbnail location
* lisp/image-dired.el (image-dired-thumb-name): Conform to the latest standard: consider XDG_CACHE_HOME, falling back on ~/.cache.
-rw-r--r--lisp/image-dired.el9
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/image-dired.el b/lisp/image-dired.el
index 1c99db333f5..066a9949166 100644
--- a/lisp/image-dired.el
+++ b/lisp/image-dired.el
@@ -587,9 +587,12 @@ the thumbnail file name unique. For per-directory storage, just
587add a subdirectory. For standard storage, produce the file name 587add a subdirectory. For standard storage, produce the file name
588according to the Thumbnail Managing Standard." 588according to the Thumbnail Managing Standard."
589 (cond ((eq 'standard image-dired-thumbnail-storage) 589 (cond ((eq 'standard image-dired-thumbnail-storage)
590 (expand-file-name 590 (let* ((xdg (getenv "XDG_CACHE_HOME"))
591 (concat "~/.thumbnails/normal/" 591 (dir (if (and xdg (file-name-absolute-p xdg))
592 (md5 (concat "file://" (expand-file-name file))) ".png"))) 592 xdg "~/.cache")))
593 (expand-file-name
594 (concat (md5 (concat "file://" (expand-file-name file))) ".png")
595 (expand-file-name "thumbnails/normal" dir))))
593 ((eq 'use-image-dired-dir image-dired-thumbnail-storage) 596 ((eq 'use-image-dired-dir image-dired-thumbnail-storage)
594 (let* ((f (expand-file-name file)) 597 (let* ((f (expand-file-name file))
595 (md5-hash 598 (md5-hash