]> code.delx.au - gnu-emacs-elpa/commitdiff
ivy.el (ivy-expand-file-if-directory): Fix "/ssh:" regression
authorOleh Krehel <ohwoeowho@gmail.com>
Mon, 7 Mar 2016 20:37:58 +0000 (21:37 +0100)
committerOleh Krehel <ohwoeowho@gmail.com>
Mon, 7 Mar 2016 20:39:40 +0000 (21:39 +0100)
ivy.el

diff --git a/ivy.el b/ivy.el
index 5a19227948b320a89e60bf27e266ddff1c988dee..fcac7d6456f4a869776d2761c33fb74f37db54ba 100644 (file)
--- a/ivy.el
+++ b/ivy.el
@@ -605,9 +605,11 @@ When ARG is t, exit with current text, ignoring the candidates."
 When this directory doesn't exist, return nil."
   (when (stringp file-name)
     (let ((full-name
-           (file-name-as-directory
-            (expand-file-name file-name ivy--directory))))
-      (when (file-directory-p full-name)
+           ;; Ignore host name must not match method "ssh"
+           (ignore-errors
+             (file-name-as-directory
+              (expand-file-name file-name ivy--directory)))))
+      (when (and full-name (file-directory-p full-name))
         full-name))))
 
 (defcustom ivy-tab-space nil