Fix error when XDG_*_HOME is specified
Unlike some other lisps scheme's `unless' returns `#<unspecified>' instead of nil, and `string-append' doesn't accept this as a valid argument. So use an empty string if XDG_*_HOME has been specified and FALLBACK otherwise.
This commit is contained in:
parent
87217e9858
commit
addf53abed
1 changed files with 1 additions and 1 deletions
|
@ -90,7 +90,7 @@
|
|||
(define (storage-dir xdg-env fallback)
|
||||
(let ((xdg (getenv xdg-env)))
|
||||
(string-append
|
||||
(or xdg (getenv "HOME")) (unless xdg "/" fallback) "/gitto")))
|
||||
(or xdg (getenv "HOME")) (if xdg "" fallback) "/gitto")))
|
||||
|
||||
(define (config-dir) (storage-dir "XDG_CONFIG_HOME" "/.config"))
|
||||
(define (config-file file) (string-append (config-dir) "/" file))
|
||||
|
|
Loading…
Reference in a new issue