aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorMichael Albinus2021-09-11 15:35:51 +0200
committerMichael Albinus2021-09-11 15:35:51 +0200
commitef65d717d0a1eeb6530176b59aa03cd09efb5fa9 (patch)
treed584da3097eeaa91902e789d50e6c005e6327471 /lisp
parent6343384348180b18be191be64d7106c4866c0675 (diff)
downloademacs-ef65d717d0a1eeb6530176b59aa03cd09efb5fa9.tar.gz
emacs-ef65d717d0a1eeb6530176b59aa03cd09efb5fa9.zip
Tramp code cleanup
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-make-directory): Simplify. * lisp/net/tramp-sh.el (tramp-methods) <telnet, nc>: Don't use "%n" marker. * test/lisp/net/tramp-tests.el (tramp-test13-make-directory): Merge with `tramp-test-make-directory-helper' and `tramp-test13-make-directory-with-file-modes'. (tramp-test44-asynchronous-requests): Use always the same operation in timer.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/net/tramp-gvfs.el8
-rw-r--r--lisp/net/tramp-sh.el4
2 files changed, 6 insertions, 6 deletions
diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el
index eb889bb4f28..25deead8133 100644
--- a/lisp/net/tramp-gvfs.el
+++ b/lisp/net/tramp-gvfs.el
@@ -1574,10 +1574,10 @@ If FILE-SYSTEM is non-nil, return file system attributes."
1574 (when (and parents (not (file-directory-p ldir))) 1574 (when (and parents (not (file-directory-p ldir)))
1575 (make-directory ldir parents)) 1575 (make-directory ldir parents))
1576 ;; Just do it. 1576 ;; Just do it.
1577 (or (let ((mkdir-succeeded 1577 (or (when-let ((mkdir-succeeded
1578 (tramp-gvfs-send-command 1578 (tramp-gvfs-send-command
1579 v "gvfs-mkdir" (tramp-gvfs-url-file-name dir)))) 1579 v "gvfs-mkdir" (tramp-gvfs-url-file-name dir))))
1580 (if mkdir-succeeded (set-file-modes dir (default-file-modes))) 1580 (set-file-modes dir (default-file-modes))
1581 mkdir-succeeded) 1581 mkdir-succeeded)
1582 (and parents (file-directory-p dir)) 1582 (and parents (file-directory-p dir))
1583 (tramp-error v 'file-error "Couldn't make directory %s" dir)))))) 1583 (tramp-error v 'file-error "Couldn't make directory %s" dir))))))
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index e57145e8e7c..dc049782fd2 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -244,14 +244,14 @@ The string is used in `tramp-methods'.")
244 (add-to-list 'tramp-methods 244 (add-to-list 'tramp-methods
245 `("telnet" 245 `("telnet"
246 (tramp-login-program "telnet") 246 (tramp-login-program "telnet")
247 (tramp-login-args (("%h") ("%p") ("%n"))) 247 (tramp-login-args (("%h") ("%p")))
248 (tramp-remote-shell ,tramp-default-remote-shell) 248 (tramp-remote-shell ,tramp-default-remote-shell)
249 (tramp-remote-shell-login ("-l")) 249 (tramp-remote-shell-login ("-l"))
250 (tramp-remote-shell-args ("-c")))) 250 (tramp-remote-shell-args ("-c"))))
251 (add-to-list 'tramp-methods 251 (add-to-list 'tramp-methods
252 `("nc" 252 `("nc"
253 (tramp-login-program "telnet") 253 (tramp-login-program "telnet")
254 (tramp-login-args (("%h") ("%p") ("%n"))) 254 (tramp-login-args (("%h") ("%p")))
255 (tramp-remote-shell ,tramp-default-remote-shell) 255 (tramp-remote-shell ,tramp-default-remote-shell)
256 (tramp-remote-shell-login ("-l")) 256 (tramp-remote-shell-login ("-l"))
257 (tramp-remote-shell-args ("-c")) 257 (tramp-remote-shell-args ("-c"))