From 858a3f9db6ca92191bcce6d40e984710a969ca75 Mon Sep 17 00:00:00 2001 From: Thierry Volpiatto Date: Mon, 25 Apr 2016 14:22:24 +0200 Subject: [PATCH] Fix backup fn, DRY and ignore symlinks directories. * dired-async.el (dired-async-create-files): Do it. --- dired-async.el | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dired-async.el b/dired-async.el index 00e17cee2..64f958a1d 100644 --- a/dired-async.el +++ b/dired-async.el @@ -263,11 +263,10 @@ ESC or `q' to not overwrite any of the remaining files, ;; Symlinks are copied as file from source unlike ;; `dired-copy-file' which is same as cp -d. (lambda (from to ok) - (cond ((eq t (nth 0 (file-attributes from))) (ignore)) + (cond ((file-directory-p from) (ignore)) (t (let ((count 0)) (while (let ((attrs (file-attributes to))) - (and attrs - (null (nth 0 (file-attributes to))))) + (and attrs (null (nth 0 attrs)))) (cl-incf count) (setq to (concat (file-name-sans-versions to) (format ".~%s~" count))))) -- 2.39.2