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

    DRY use helm-ff-trash-file-p
---
 helm-files.el | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/helm-files.el b/helm-files.el
index 4aa76cf514a..c6f09301aaa 100644
--- a/helm-files.el
+++ b/helm-files.el
@@ -4623,10 +4623,7 @@ Arg FILE is the real part of candidate, a filename with 
no props."
                           (helm-basedir candidate)))
       (setq actions (helm-append-at-nth
                      actions '(("Recover file" . recover-file)) 4)))
-    (cond ((and (file-exists-p candidate)
-                (string-match helm-ff--trash-directory-regexp
-                              (helm-basedir (expand-file-name candidate)))
-                (not (member (helm-basename candidate) '("." ".."))))
+    (cond ((helm-ff-trash-file-p candidate)
            (helm-append-at-nth
             actions
             '(("Restore file(s) from trash" . helm-restore-file-from-trash)

Reply via email to