From b5a9dc5c0776259113ecccacb7410262266dc971 Mon Sep 17 00:00:00 2001 From: Oleh Krehel Date: Sat, 16 Apr 2016 17:40:08 +0200 Subject: [PATCH] ivy.el (ivy--reset-state): file-directory-p needs a string --- ivy.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ivy.el b/ivy.el index 22deab9a5..1a9ba33d9 100644 --- a/ivy.el +++ b/ivy.el @@ -1400,11 +1400,11 @@ This is useful for recursive `ivy-read'." :test #'equal))) (setq coll (all-completions "" collection predicate)))) ((eq collection 'read-file-name-internal) - (setq ivy--directory - (if (file-directory-p initial-input) - (prog1 initial-input - (setq initial-input nil)) - default-directory)) + (if (and initial-input (file-directory-p initial-input)) + (progn + (setq ivy--directory initial-input) + (setq initial-input nil)) + (setq ivy--directory default-directory)) (require 'dired) (when preselect (let ((preselect-directory (file-name-directory preselect))) -- 2.39.2