branch: elpa/helm
commit 2833968f895a1f8b6730c527662b9536bcab0195
Author: Thierry Volpiatto <[email protected]>
Commit: Thierry Volpiatto <[email protected]>

    Fix issue with abbreviate-file-name in helm-highlight-files (#2709)
---
 helm-for-files.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/helm-for-files.el b/helm-for-files.el
index e812f3f10d..25cf059fd8 100644
--- a/helm-for-files.el
+++ b/helm-for-files.el
@@ -181,7 +181,11 @@ Colorize only symlinks, directories and files."
                                (not (and helm--url-regexp
                                          (string-match helm--url-regexp i)))
                                (not (string-match helm-ff-url-regexp i)))
-                          (helm-basename i) (abbreviate-file-name i))
+                          (helm-basename i)
+                        ;; (abbreviate-file-name i) and i may be the same 
object
+                        ;; when abbreviate-file-name doesn't modify i
+                        ;; e.g. (abbreviate-file-name "/foo") bug#2709.
+                        (copy-sequence (abbreviate-file-name i)))
            for isremote = (or (file-remote-p i)
                               (helm-file-on-mounted-network-p i))
            ;; file-attributes is too slow on remote files,

Reply via email to