aboutsummaryrefslogtreecommitdiff
path: root/guix/utils.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2016-06-25 00:58:48 +0200
committerLudovic Courtès <ludo@gnu.org>2016-06-25 01:13:23 +0200
commit934c5d5b28f74ab2fe187ad727e4b56cfda6def8 (patch)
treeabb78a43c5b58ed089d64d3e81ca73055bab7f1c /guix/utils.scm
parent25a3bfbe77cb45aa26f9af8c72e7f978a177187e (diff)
downloadgnu-guix-934c5d5b28f74ab2fe187ad727e4b56cfda6def8.tar
gnu-guix-934c5d5b28f74ab2fe187ad727e4b56cfda6def8.tar.gz
utils: 'cache-directory' always appends "/guix".
Fixes <http://bugs.gnu.org/23836>. Fixes a regression introduced in f10dcbf1a92c147a2fedba6f774afa6a7013fcdf. Reported by myglc2 <myglc2@gmail.com>. * guix/utils.scm (cache-directory): Always append "/guix".
Diffstat (limited to 'guix/utils.scm')
-rw-r--r--guix/utils.scm9
1 files changed, 5 insertions, 4 deletions
diff --git a/guix/utils.scm b/guix/utils.scm
index 6bcee17776..9e1b8ead0a 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -637,10 +637,11 @@ output port, and PROC's result is returned."
(define (cache-directory)
"Return the cache directory for Guix, by default ~/.cache/guix."
- (or (getenv "XDG_CACHE_HOME")
- (and=> (or (getenv "HOME")
- (passwd:dir (getpwuid (getuid))))
- (cut string-append <> "/.cache/guix"))))
+ (string-append (or (getenv "XDG_CACHE_HOME")
+ (and=> (or (getenv "HOME")
+ (passwd:dir (getpwuid (getuid))))
+ (cut string-append <> "/.cache")))
+ "/guix"))
(define (readlink* file)
"Call 'readlink' until the result is not a symlink."