Commit 66ccc659 authored by Mark Oteiza's avatar Mark Oteiza
Browse files

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.
parent 44a77d34
......@@ -587,9 +587,12 @@ the thumbnail file name unique. For per-directory storage, just
add a subdirectory. For standard storage, produce the file name
according to the Thumbnail Managing Standard."
(cond ((eq 'standard image-dired-thumbnail-storage)
(concat "~/.thumbnails/normal/"
(md5 (concat "file://" (expand-file-name file))) ".png")))
(let* ((xdg (getenv "XDG_CACHE_HOME"))
(dir (if (and xdg (file-name-absolute-p xdg))
xdg "~/.cache")))
(concat (md5 (concat "file://" (expand-file-name file))) ".png")
(expand-file-name "thumbnails/normal" dir))))
((eq 'use-image-dired-dir image-dired-thumbnail-storage)
(let* ((f (expand-file-name file))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment