summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThierry Volpiatto <thierry.volpiatto@gmail.com>2017-09-03 06:41:17 +0200
committerThierry Volpiatto <thierry.volpiatto@gmail.com>2017-09-03 06:41:17 +0200
commita83e2dd3ef36046da61a73c4b7a5e6736eafb0d1 (patch)
tree80a252df213fca48416a220efa6e4f6a36997931
parent25450b3ff1c55c74f577a282d95fba7783d31c47 (diff)
Fix HFF bookmark handler for unconnected remote files
* helm-files.el (helm-ff-bookmark-jump): Do it.
-rw-r--r--helm-files.el11
1 files changed, 8 insertions, 3 deletions
diff --git a/helm-files.el b/helm-files.el
index 8f1aa600..c5a1ec0d 100644
--- a/helm-files.el
+++ b/helm-files.el
@@ -631,9 +631,14 @@ Should not be used among other sources.")
"bookmark handler for `helm-find-files'."
(let ((fname (bookmark-prop-get bookmark 'filename))
(presel (bookmark-prop-get bookmark 'presel)))
- (helm-find-files-1 fname (if helm-ff-transformer-show-only-basename
- (helm-basename presel)
- presel))))
+ ;; Force tramp connection with `file-directory-p' before lauching
+ ;; hff otherwise the directory name is inserted on top before
+ ;; tramp starts and display candidates. FNAME is here always a
+ ;; directory.
+ (when (file-directory-p fname)
+ (helm-find-files-1 fname (if helm-ff-transformer-show-only-basename
+ (helm-basename presel)
+ presel)))))
(defun helm-ff-bookmark-set ()
"Record `helm-find-files' session in bookmarks."