utils: 'cache-directory' always appends "/guix".

Fixes <http://bugs.gnu.org/23836>.
Fixes a regression introduced in f10dcbf1a9.
Reported by myglc2 <myglc2@gmail.com>.

* guix/utils.scm (cache-directory): Always append "/guix".
This commit is contained in:
Ludovic Courtès 2016-06-25 00:58:48 +02:00
parent 25a3bfbe77
commit 934c5d5b28
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -637,10 +637,11 @@ (define (with-atomic-file-output file proc)
(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."