From addf53abedaa54f36562c575f4b0834658553f05 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Fri, 10 May 2013 21:58:31 +0200 Subject: Fix error when XDG_*_HOME is specified Unlike some other lisps scheme's `unless' returns `#' 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. --- gitto/main.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)) -- cgit v1.3-2-g0d8e