From 1f12dfda4aeb6d08af454d60caa5985b2bd5b1ba Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sat, 28 Aug 2021 15:54:18 -0700 Subject: cache XDG_CACHE_HOME as a connattr This should provide a performance improvement. Signed-off-by: Sean Whitton --- src/image.lisp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/image.lisp') diff --git a/src/image.lisp b/src/image.lisp index ce3a34a..8bc34b3 100644 --- a/src/image.lisp +++ b/src/image.lisp @@ -142,11 +142,10 @@ already running from FILENAME." (format nil "Dumped image to evaluate ~S" form) "Dumped image to execute current deployment")) (:apply - (let ((file (or filename (ensure-directories-exist - (ensure-pathname - (strcat (or (getenv "XDG_CACHE_HOME") - (strcat (getenv "HOME") "/.cache")) - "/consfigurator/images/latest")))))) + (let ((file (or filename + (ensure-directories-exist + (merge-pathnames "consfigurator/images/latest" + (get-connattr :XDG-CACHE-HOME)))))) (unless (and (not always) (eql :linux (uiop:operating-system)) (pathname-equal file (resolve-symlinks "/proc/self/exe"))) -- cgit v1.2.3