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

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

[nongnu] elpa/helm a980140467 2/2: We still need to handle directory cre


From: ELPA Syncer
Subject: [nongnu] elpa/helm a980140467 2/2: We still need to handle directory creation for Emacs version < 27.1 that
Date: Thu, 25 May 2023 15:01:15 -0400 (EDT)

branch: elpa/helm
commit a980140467ea7abef34f14fa754b9a0db7298b20
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@posteo.net>

    We still need to handle directory creation for Emacs version < 27.1 that
    
    doesn't have `dired-create-destination-dirs'.
---
 helm-files.el | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/helm-files.el b/helm-files.el
index 7bca98fb0f..eec1e30241 100644
--- a/helm-files.el
+++ b/helm-files.el
@@ -1196,7 +1196,16 @@ ACTION can be `rsync' or any action supported by 
`helm-dired-action'."
                                               (if 
helm-ff-transformer-show-only-basename
                                                   (helm-basename cand) cand))))
                         :initial-input (helm-dwim-target-directory)
-                        :history (helm-find-files-history nil :comp-read 
nil)))))))
+                        :history (helm-find-files-history nil :comp-read 
nil))))))
+         (dest-dir-p (file-directory-p dest))
+         (dest-dir   (helm-basedir dest)))
+    ;; We still need to handle directory creation for Emacs version < 27.1 that
+    ;; doesn't have `dired-create-destination-dirs'.
+    (unless (or (boundp 'dired-create-destination-dirs)
+                dest-dir-p
+                (file-directory-p dest-dir))
+      (when (y-or-n-p (format "Create directory `%s'? " dest-dir))
+        (make-directory dest-dir t)))
     (if (eq action 'rsync)
         (helm-rsync-copy-files ifiles dest rsync-switches)
       (helm-dired-action



reply via email to

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