forked from mirrors/org-mode
org-persist.el: Do not try to follow XDG on Windows
* lisp/org-persist.el (org-persist-directory): `xdg-cache-home' apparently returns "~/.cache" even on Windows. Fallback to `user-emacs-directory' when the directory returned by `xdg-cache-home' does not exist. Reported in https://list.orgmode.org/CAPY3P0RWTkUv_5q0aJjgmpaDGzxYYrs0z4vyEF2Sxpua7BtztA@mail.gmail.com/T/#u
This commit is contained in:
parent
d4e1925147
commit
6621ee32e4
|
@ -36,12 +36,13 @@
|
|||
(declare-function org-at-heading-p "org" (&optional invisible-not-ok))
|
||||
|
||||
(defvar org-persist-directory (expand-file-name
|
||||
(org-file-name-concat
|
||||
(let ((cache-dir (xdg-cache-home)))
|
||||
(if (seq-empty-p cache-dir)
|
||||
user-emacs-directory
|
||||
cache-dir))
|
||||
"org-persist/"))
|
||||
(org-file-name-concat
|
||||
(let ((cache-dir (xdg-cache-home)))
|
||||
(if (or (seq-empty-p cache-dir)
|
||||
(not (file-exists-p cache-dir)))
|
||||
user-emacs-directory
|
||||
cache-dir))
|
||||
"org-persist/"))
|
||||
"Directory where the data is stored.")
|
||||
|
||||
(defvar org-persist-index-file "index"
|
||||
|
|
Loading…
Reference in New Issue