Fix usage without XDG_*_HOME
`concatenate' does not work as I thought, cannot handle list arguments, except `nil'.
This commit is contained in:
parent
5ca43f20ca
commit
ce8cfd58f4
1 changed files with 14 additions and 10 deletions
|
@ -107,19 +107,23 @@ The result contains the url, name and the description of the bookmark."
|
||||||
|
|
||||||
(defun get-db-location ()
|
(defun get-db-location ()
|
||||||
"Get the location of the database."
|
"Get the location of the database."
|
||||||
|
(let ((xdg (sb-ext:posix-getenv "XDG_DATA_HOME"))
|
||||||
|
(home (sb-ext:posix-getenv "HOME")))
|
||||||
(pathname
|
(pathname
|
||||||
(apply 'concatenate 'string
|
(apply 'concatenate 'string
|
||||||
(or (sb-ext:posix-getenv "XDG_DATA_HOME")
|
(or xdg home)
|
||||||
(list (sb-ext:posix-getenv "HOME") "/.local/share"))
|
(unless xdg "/.local/share")
|
||||||
'("/clark/bookmarks.db"))))
|
'("/clark/bookmarks.db")))))
|
||||||
|
|
||||||
(defun get-rc-location ()
|
(defun get-rc-location ()
|
||||||
"Get the location of the RC file."
|
"Get the location of the RC file."
|
||||||
|
(let ((xdg (sb-ext:posix-getenv "XDG_CONFIG_HOME"))
|
||||||
|
(home (sb-ext:posix-getenv "HOME")))
|
||||||
(pathname
|
(pathname
|
||||||
(apply 'concatenate 'string
|
(apply 'concatenate 'string
|
||||||
(or (sb-ext:posix-getenv "XDG_CONFIG_HOME")
|
(or xdg home)
|
||||||
(list (sb-ext:posix-getenv "HOME") "/.config"))
|
(unless xdg "/.config")
|
||||||
'("/clark/rc.lisp"))))
|
'("/clark/rc.lisp")))))
|
||||||
|
|
||||||
(defun get-tag-id (name)
|
(defun get-tag-id (name)
|
||||||
"Get the rowid of tag NAME."
|
"Get the rowid of tag NAME."
|
||||||
|
|
Loading…
Reference in a new issue