Commit 2a792687 authored by Mark Oteiza's avatar Mark Oteiza
Browse files

lisp/mpc.el (mpc-file-local-copy): check more config locations

parent 0fafb582
......@@ -910,7 +910,11 @@ If PLAYLIST is t or nil or missing, use the main playlist."
;; Try to set mpc-mpd-music-directory.
(when (and (null mpc-mpd-music-directory)
(string-match "\\`localhost" mpc-host))
(let ((files '("~/.mpdconf" "/etc/mpd.conf"))
(let ((files `(,(let ((xdg (getenv "XDG_CONFIG_HOME")))
(concat (if (and xdg (file-name-absolute-p xdg))
xdg "~/.config")
"~/.mpdconf" "~/.mpd/mpd.conf" "/etc/mpd.conf"))
(while (and files (not file))
(if (file-exists-p (car files)) (setq file (car files)))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment