Don't force XDG_DATA_HOME

Now, when XGD_DATA_HOME is empty, it should default to `~/.gitto/' for
`data-dir', the old way didn't quite work since the `mkdir' function
doesn't translate `~/' to HOME.
This commit is contained in:
Tom Willemsen 2012-06-30 23:09:37 +02:00
parent 4379c6666d
commit 968543cd3c

View file

@ -7,8 +7,11 @@
(ice-9 rdelim))
(define data-dir
(string-append (or (getenv "XDG_DATA_HOME") "~/.local/share")
"/gitracker"))
(let ((xdg (getenv "XGD_DATA_HOME"))
(name "gitto"))
(if xdg
(string-append xdg "/" name)
(string-append (getenv "HOME") "/." name))))
(define repositories-file
(string-append data-dir "/repos.scm"))