]> code.delx.au - gnu-emacs/commitdiff
lisp/mpc.el (mpc--proc-connect): use file-name-absolute-p
authorMark Oteiza <mvoteiza@udel.edu>
Mon, 7 Sep 2015 22:01:00 +0000 (18:01 -0400)
committerMark Oteiza <mvoteiza@udel.edu>
Thu, 10 Sep 2015 17:41:09 +0000 (13:41 -0400)
lisp/mpc.el

index 3600b081f9b4c7f55a029213d080cd53aa80d14a..bc7d4733ee84be8258e317bdd93d26944623465a 100644 (file)
@@ -268,7 +268,10 @@ defaults to 6600 and HOST defaults to localhost."
                 (if (string-match "[^[:digit:]]" v)
                     (string-to-number v)
                   v)))))
-    (when (string-prefix-p "/" host)    ;FIXME: Use file-name-absolute-p?
+    (when (file-name-absolute-p host)
+      ;; Expand file name because `file-name-absolute-p'
+      ;; considers paths beginning with "~" as absolute
+      (setq host (expand-file-name host))
       (setq local t))
 
     (mpc--debug "Connecting to %s:%s..." host port)