summaryrefslogtreecommitdiff
path: root/lisp/net/tramp-smb.el
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2021-01-22 17:39:52 +0100
committerMichael Albinus <michael.albinus@gmx.de>2021-01-22 17:39:52 +0100
commitb2b26bd4d66d25f2456baa4e9eb9516c122a30e0 (patch)
tree80f2d1491abaeed174a44d03d7ee2471eadea054 /lisp/net/tramp-smb.el
parent4c0dce4b66c41a12a4cf7439b036962e9525eeaa (diff)
downloademacs-b2b26bd4d66d25f2456baa4e9eb9516c122a30e0.tar.gz
emacs-b2b26bd4d66d25f2456baa4e9eb9516c122a30e0.tar.bz2
emacs-b2b26bd4d66d25f2456baa4e9eb9516c122a30e0.zip
Use RemoteCommand option for Tramp's sshx and scpx methods
* doc/misc/tramp.texi (Inline methods) <sshx>: (External methods) <scpx>: Adapt call sequence. (Remote shell setup): Mention, that sshx and scpx overwrite RemoteCommand. (Remote processes): Restriction: direct asynchronous processes cannot be used when RemoteCommand is in use. `tramp-remote-process-environment' is not ignored any longer. * lisp/net/tramp-sh.el (tramp-methods) <sshx, scpx>: Handle login shell via RemoteCommand. Remove `tramp-direct-async' parameter. (tramp-maybe-open-connection): Add "-i" to login. * lisp/net/tramp-smb.el (tramp-smb-errors): Add "NT_STATUS_NOT_SUPPORTED". (tramp-smb-handle-insert-directory): Fix point moving error. * test/lisp/net/tramp-tests.el (tramp-test34-explicit-shell-file-name): Use `get-buffer-process' where appropriate.
Diffstat (limited to 'lisp/net/tramp-smb.el')
-rw-r--r--lisp/net/tramp-smb.el24
1 files changed, 12 insertions, 12 deletions
diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el
index 1604e8962c0..c5a74a5c653 100644
--- a/lisp/net/tramp-smb.el
+++ b/lisp/net/tramp-smb.el
@@ -156,6 +156,7 @@ this variable (\"client min protocol=NT1\") ."
"NT_STATUS_NO_SUCH_FILE"
"NT_STATUS_NO_SUCH_USER"
"NT_STATUS_NOT_A_DIRECTORY"
+ "NT_STATUS_NOT_SUPPORTED"
"NT_STATUS_OBJECT_NAME_COLLISION"
"NT_STATUS_OBJECT_NAME_INVALID"
"NT_STATUS_OBJECT_NAME_NOT_FOUND"
@@ -371,17 +372,17 @@ pass to the OPERATION."
(tramp-error
v2 'file-error
"add-name-to-file: %s must not be a directory" filename))
- ;; Do the 'confirm if exists' thing.
- (when (file-exists-p newname)
- ;; What to do?
- (if (or (null ok-if-already-exists) ; not allowed to exist
- (and (numberp ok-if-already-exists)
- (not (yes-or-no-p
- (format
- "File %s already exists; make it a link anyway? "
- v2-localname)))))
- (tramp-error v2 'file-already-exists newname)
- (delete-file newname)))
+ ;; Do the 'confirm if exists' thing.
+ (when (file-exists-p newname)
+ ;; What to do?
+ (if (or (null ok-if-already-exists) ; not allowed to exist
+ (and (numberp ok-if-already-exists)
+ (not (yes-or-no-p
+ (format
+ "File %s already exists; make it a link anyway? "
+ v2-localname)))))
+ (tramp-error v2 'file-already-exists newname)
+ (delete-file newname)))
;; We must also flush the cache of the directory, because
;; `file-attributes' reads the values from there.
(tramp-flush-file-properties v2 v2-localname)
@@ -1166,7 +1167,6 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
(insert " -> " (tramp-compat-file-attribute-type attr))))
(insert "\n")
- (forward-line)
(beginning-of-line)))
entries))))))