branch: master
commit 34ee9c55678bd8f02955aca3a668e6ca9e8c107a
Author: Thierry Volpiatto <[email protected]>
Commit: Thierry Volpiatto <[email protected]>

    * helm-async.el (dired-create-file): Fix operation is executed even when 
replying no for overwriting.
---
 helm-async.el |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/helm-async.el b/helm-async.el
index db0d340..77c8b32 100644
--- a/helm-async.el
+++ b/helm-async.el
@@ -221,9 +221,15 @@ ESC or `q' to not overwrite any of the remaining files,
                    (file-in-directory-p destname from)
                    (error "Cannot copy `%s' into its subdirectory `%s'"
                           from to)))
-            (if (and dired-overwrite-confirmed
-                     helm-async-be-async)
-                (push (cons from to) async-fn-list)
+            (if helm-async-be-async
+                (if overwrite
+                    (or (and dired-overwrite-confirmed
+                             (push (cons from to) async-fn-list))
+                        (progn
+                          (push (dired-make-relative from) failures)
+                          (dired-log "%s `%s' to `%s' failed"
+                                     operation from to)))
+                    (push (cons from to) async-fn-list))
                 (condition-case err
                     (progn
                       (funcall file-creator from to dired-overwrite-confirmed)

Reply via email to