emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/helm cfdd5376b8 1/2: Avoid one unnecessary call to file-tr


From: ELPA Syncer
Subject: [nongnu] elpa/helm cfdd5376b8 1/2: Avoid one unnecessary call to file-truename
Date: Sat, 5 Mar 2022 05:58:10 -0500 (EST)

branch: elpa/helm
commit cfdd5376b81206967ab38ea9730ed0b4877a923a
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@posteo.net>

    Avoid one unnecessary call to file-truename
    
    helm-ff-invalid-symlink is calling file-truename to know the name of
    the link but we already know it because file-attributes returns it in
    its nth 0 as a string.
---
 helm-files.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/helm-files.el b/helm-files.el
index 0d9abdd70c..3558f383f9 100644
--- a/helm-files.el
+++ b/helm-files.el
@@ -4030,7 +4030,8 @@ If SKIP-BORING-CHECK is non nil don't filter boring 
files."
                  (string-match "\\`@@@@file-error:" file) file)
                 (;; A dead symlink.
                  (and (stringp type)
-                      (not (helm-ff-valid-symlink-p file))
+                      ;; Check non existence of link.
+                      (not (file-exists-p type))
                       (not (string-match "^\\.#" basename)))
                  (add-face-text-property 0 len 'helm-ff-invalid-symlink t disp)
                  (cons disp file))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]