aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorMichael Albinus2017-10-08 13:55:20 +0200
committerMichael Albinus2017-10-08 13:55:20 +0200
commit1cd334cd47dd3d5085a0779499aff2f6617cb3d5 (patch)
tree5d4e80194f875ec53d6a0df4f3dfec3eb39c397b /lisp
parentf1c73de47d64c22b3a83a18b4bdbd8ccbb2cca02 (diff)
downloademacs-1cd334cd47dd3d5085a0779499aff2f6617cb3d5.tar.gz
emacs-1cd334cd47dd3d5085a0779499aff2f6617cb3d5.zip
Handle PARENTS properly in tramp-*-handle-make-directory
* lisp/net/tramp-adb.el (tramp-adb-handle-make-directory): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-make-directory): Handle PARENTS properly. * test/lisp/net/tramp-tests.el (tramp-test13-make-directory): Extend test.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/net/tramp-adb.el9
-rw-r--r--lisp/net/tramp-gvfs.el5
2 files changed, 8 insertions, 6 deletions
diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el
index 5268e80a33d..e75efcf483f 100644
--- a/lisp/net/tramp-adb.el
+++ b/lisp/net/tramp-adb.el
@@ -549,11 +549,12 @@ Emacs dired can't find files."
549 (let ((par (expand-file-name ".." dir))) 549 (let ((par (expand-file-name ".." dir)))
550 (unless (file-directory-p par) 550 (unless (file-directory-p par)
551 (make-directory par parents)))) 551 (make-directory par parents))))
552 (tramp-adb-barf-unless-okay
553 v (format "mkdir %s" (tramp-shell-quote-argument localname))
554 "Couldn't make directory %s" dir)
555 (tramp-flush-file-property v (file-name-directory localname)) 552 (tramp-flush-file-property v (file-name-directory localname))
556 (tramp-flush-directory-property v localname))) 553 (tramp-flush-directory-property v localname)
554 (unless (or (tramp-adb-send-command-and-check
555 v (format "mkdir %s" (tramp-shell-quote-argument localname)))
556 (and parents (file-directory-p dir)))
557 (tramp-error v 'file-error "Couldn't make directory %s" dir))))
557 558
558(defun tramp-adb-handle-delete-directory (directory &optional recursive _trash) 559(defun tramp-adb-handle-delete-directory (directory &optional recursive _trash)
559 "Like `delete-directory' for Tramp files." 560 "Like `delete-directory' for Tramp files."
diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el
index 3a1c9f9b5ac..2b29a1b55f5 100644
--- a/lisp/net/tramp-gvfs.el
+++ b/lisp/net/tramp-gvfs.el
@@ -1206,8 +1206,9 @@ file-notify events."
1206 (when (and parents (not (file-directory-p ldir))) 1206 (when (and parents (not (file-directory-p ldir)))
1207 (make-directory ldir parents)) 1207 (make-directory ldir parents))
1208 ;; Just do it. 1208 ;; Just do it.
1209 (unless (tramp-gvfs-send-command 1209 (unless (or (tramp-gvfs-send-command
1210 v "gvfs-mkdir" (tramp-gvfs-url-file-name dir)) 1210 v "gvfs-mkdir" (tramp-gvfs-url-file-name dir))
1211 (and parents (file-directory-p dir)))
1211 (tramp-error v 'file-error "Couldn't make directory %s" dir)))))) 1212 (tramp-error v 'file-error "Couldn't make directory %s" dir))))))
1212 1213
1213(defun tramp-gvfs-handle-rename-file 1214(defun tramp-gvfs-handle-rename-file