diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2021-08-29 12:31:21 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2021-08-31 15:55:26 -0700 |
commit | 030fa324859eb5b3e7b539c6e1dcbbb3fac1db4c (patch) | |
tree | 0e8314faa3e16b20e9ecafd9ba42275d543d59d7 /src | |
parent | 2248ee00ede423fc55791259099cbf7d5f57fcdc (diff) | |
download | consfigurator-030fa324859eb5b3e7b539c6e1dcbbb3fac1db4c.tar.gz |
use UIOP:XDG-CACHE-HOME
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src')
-rw-r--r-- | src/connection/local.lisp | 3 | ||||
-rw-r--r-- | src/data.lisp | 4 | ||||
-rw-r--r-- | src/data/asdf.lisp | 4 | ||||
-rw-r--r-- | src/image.lisp | 4 |
4 files changed, 4 insertions, 11 deletions
diff --git a/src/connection/local.lisp b/src/connection/local.lisp index abe6f01..53bfc20 100644 --- a/src/connection/local.lisp +++ b/src/connection/local.lisp @@ -72,5 +72,4 @@ (defmethod connection-connattr ((connection local-connection) (k (eql :XDG-CACHE-HOME))) - (ensure-directory-pathname (or (getenv "XDG_CACHE_HOME") - (strcat (getenv "HOME") "/.cache")))) + (uiop:xdg-cache-home)) diff --git a/src/data.lisp b/src/data.lisp index fe96809..fa814f0 100644 --- a/src/data.lisp +++ b/src/data.lisp @@ -470,9 +470,7 @@ properties, or data sources which return objects referencing existing files." :version (caddr triple)))) (defun get-local-data-cache-dir () - (ensure-directory-pathname - (strcat (or (getenv "XDG_CACHE_HOME") (strcat (getenv "HOME") "/.cache")) - "/consfigurator/data"))) + (merge-pathnames "consfigurator/data/" (uiop:xdg-cache-home))) ;;;; Passphrases diff --git a/src/data/asdf.lisp b/src/data/asdf.lisp index 83142c0..ee1385c 100644 --- a/src/data/asdf.lisp +++ b/src/data/asdf.lisp @@ -29,9 +29,7 @@ (defun get-path-to-system-tarball (iden1 system) (let* ((tarball (merge-pathnames (strcat "consfigurator/systems/" system ".tar.gz") - (ensure-directory-pathname - (or (getenv "XDG_CACHE_HOME") - (strcat (getenv "HOME") "/.cache"))))) + (uiop:xdg-cache-home))) (tarball-write-date (and (file-exists-p tarball) (file-write-date tarball)))) (multiple-value-bind (version files) (system-version-files system) diff --git a/src/image.lisp b/src/image.lisp index 8bc34b3..fc29179 100644 --- a/src/image.lisp +++ b/src/image.lisp @@ -327,9 +327,7 @@ ASDF-REQUIREMENTS, after having uploaded those Lisp systems using UPLOAD-ALL-PREREQUISITE-DATA.") (:method ((asdf-requirements asdf-requirements)) `(progn - (let* ((cache (ensure-directory-pathname - (or (getenv "XDG_CACHE_HOME") - (strcat (getenv "HOME") "/.cache")))) + (let* ((cache (uiop:xdg-cache-home)) (dest (ensure-directories-exist (merge-pathnames "consfigurator/systems/" cache))) (file (merge-pathnames |