]> code.delx.au - gnu-emacs-elpa/commitdiff
Fix backup fn, DRY and ignore symlinks directories.
authorThierry Volpiatto <thierry.volpiatto@gmail.com>
Mon, 25 Apr 2016 12:22:24 +0000 (14:22 +0200)
committerThierry Volpiatto <thierry.volpiatto@gmail.com>
Mon, 25 Apr 2016 12:22:24 +0000 (14:22 +0200)
* dired-async.el (dired-async-create-files): Do it.

dired-async.el

index 00e17cee26d510c9f135dee0dd5523c0fb077a3b..64f958a1d5bd937e6a62e63ba7e041dcbdee2e58 100644 (file)
@@ -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)))))