diff options
author | Arun Isaac | 2021-11-10 22:39:11 +0530 |
---|---|---|
committer | Arun Isaac | 2021-11-10 22:39:11 +0530 |
commit | 651d4a0781cbbc44c9eafb2dd59791db5695223f (patch) | |
tree | 6eb1d8a7071e0d18d3ed9eb55af4f5a67684a937 | |
parent | f969b42a9c6ea33bc783a8139f35f75b2b0cd77e (diff) | |
download | skribilo-651d4a0781cbbc44c9eafb2dd59791db5695223f.tar.gz skribilo-651d4a0781cbbc44c9eafb2dd59791db5695223f.tar.lz skribilo-651d4a0781cbbc44c9eafb2dd59791db5695223f.zip |
utils: compat: Set fallback for *skribe-rc-directory*.
* src/guile/skribilo/utils/compat.scm (*skribe-rc-directory*): Set
fallback value in case the HOME environment variable is not set.
-rw-r--r-- | src/guile/skribilo/utils/compat.scm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/guile/skribilo/utils/compat.scm b/src/guile/skribilo/utils/compat.scm index 81f2570..7c00efb 100644 --- a/src/guile/skribilo/utils/compat.scm +++ b/src/guile/skribilo/utils/compat.scm @@ -2,6 +2,7 @@ ;;; -*- coding: iso-8859-1 -*- ;;; ;;; Copyright 2005, 2006, 2007, 2009 Ludovic Courtès <ludo@gnu.org> +;;; Copyright 2021 Arun Isaac <arunisaac@systemreboot.net> ;;; ;;; ;;; This file is part of Skribilo. @@ -105,7 +106,9 @@ (define-public *skribe-rc-directory* - (string-append (getenv "HOME") "/" ".skribilo")) + (let ((home (or (getenv "HOME") + (passwd:dir (getpwuid (getuid)))))) + (string-append home "/" ".skribilo"))) ;;; In and out ports |