summaryrefslogtreecommitdiff
path: root/helm-bookmark.el
diff options
context:
space:
mode:
authorThierry Volpiatto <thierry.volpiatto@gmail.com>2017-04-15 07:48:38 +0200
committerThierry Volpiatto <thierry.volpiatto@gmail.com>2017-04-15 07:48:38 +0200
commit4680bc5a999fe4a92675b813461584ed2f713ea1 (patch)
treefeb1dead48a028a4be8fea57725acbc5b19e468d /helm-bookmark.el
parent06fa3227227abbc0ec6abc40ecf36af74ee6b94d (diff)
Be safe when highlighting remote bookmarks.
* helm-bookmark.el (helm-highlight-bookmark): Be safe and call `file-exists-p' only if file is not remote or remote but connected.
Diffstat (limited to 'helm-bookmark.el')
-rw-r--r--helm-bookmark.el14
1 files changed, 8 insertions, 6 deletions
diff --git a/helm-bookmark.el b/helm-bookmark.el
index bdf131c3..e4c97b58 100644
--- a/helm-bookmark.el
+++ b/helm-bookmark.el
@@ -695,12 +695,14 @@ than `w3m-browse-url' use it."
(file-directory-p isfile))))
(propertize trunc 'face 'helm-bookmark-directory
'help-echo isfile))
- ;; Non existing files.
- ;; We should be safe with `file-exists-p' as
- ;; `non-essential' is bound at top level,
- ;; but watch out as this behavior is
- ;; regularly changing upstream.
- ((and isfile (not (file-exists-p isfile)))
+ ( ;; Non existing files.
+ (and isfile
+ ;; Be safe and call `file-exists-p'
+ ;; only if file is not remote or
+ ;; remote but connected.
+ (or (and (file-remote-p isfile)
+ (not (file-remote-p isfile nil t)))
+ (not (file-exists-p isfile))))
(propertize trunc 'face 'helm-bookmark-file-not-found
'help-echo isfile))
( ;; regular files