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

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

[elpa] externals/async 87853ae 29/60: Allow backing up in same directory


From: Stefan Monnier
Subject: [elpa] externals/async 87853ae 29/60: Allow backing up in same directory
Date: Tue, 8 Oct 2019 10:11:31 -0400 (EDT)

branch: externals/async
commit 87853ae35f19646f83f653b798e9f6d646de7113
Author: Thierry Volpiatto <address@hidden>
Commit: Thierry Volpiatto <address@hidden>

    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.



reply via email to

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