branch: externals/async commit 87853ae35f19646f83f653b798e9f6d646de7113 Author: Thierry Volpiatto <thierry.volpia...@gmail.com> Commit: Thierry Volpiatto <thierry.volpia...@gmail.com>
Allow backing up in same directory like "cp -f --backup=numbered foo bar". * dired-async.el (dired-async-create-files): Do it. --- dired-async.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dired-async.el b/dired-async.el index b592cac..485786c 100644 --- a/dired-async.el +++ b/dired-async.el @@ -190,7 +190,8 @@ See `dired-create-files' for the behavior of arguments." (let (to) (dolist (from fn-list) (setq to (funcall name-constructor from)) - (if (equal to from) + (if (and (equal to from) + (null (eq file-creator 'backup-file))) (progn (setq to nil) (dired-log "Cannot %s to same file: %s\n" @@ -291,7 +292,7 @@ ESC or `q' to not overwrite any of the remaining files, ;; Inline `backup-file' as long as it is not ;; available in emacs. (defalias 'backup-file - ;; Same feature as "cp --backup=numbered from to" + ;; Same feature as "cp -f --backup=numbered from to" ;; Symlinks are copied as file from source unlike ;; `dired-copy-file' which is same as cp -d. ;; Directories are omitted.