aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tom Willemse2013-05-10 21:58:31 +0200
committerGravatar Tom Willemse2013-05-10 21:58:31 +0200
commitaddf53abedaa54f36562c575f4b0834658553f05 (patch)
tree2e220750c063f2c8b4be2a3bbd1ae31c56fbb3cc
parent87217e9858de8d9fe9520b159e7d0de7a558d99e (diff)
downloadgitto-addf53abedaa54f36562c575f4b0834658553f05.tar.gz
gitto-addf53abedaa54f36562c575f4b0834658553f05.zip
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.
-rw-r--r--gitto/main.scm2
1 files changed, 1 insertions, 1 deletions
diff --git a/gitto/main.scm b/gitto/main.scm
index ad4aaa0..32e50d3 100644
--- a/gitto/main.scm
+++ b/gitto/main.scm
@@ -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))