summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2016-12-17 19:52:38 +0100
committerMichael Albinus <michael.albinus@gmx.de>2016-12-17 19:52:38 +0100
commitcfa2fb26263d741dca3c941febc0eb092a62b52e (patch)
tree742bf7d399d6fe438396b9fab358f546604bc436 /lisp
parent0390edcb81f748d00d54d37fc4e6233a70dbda50 (diff)
downloademacs-cfa2fb26263d741dca3c941febc0eb092a62b52e.tar.gz
More tests for Tramp
* lisp/net/tramp.el (tramp-drop-volume-letter): Handle quoted file names. * lisp/net/tramp-sh.el (tramp-make-copy-program-file-name): Quote file name properly. * test/lisp/net/tramp-tests.el (tramp-test05-expand-file-name): Mark quoted file name as absolute. (Bug#25183) (tramp--test-windows-nt-and-batch) (tramp--test-windows-nt-and-pscp-psftp-p): New defuns. (tramp--test-windows-nt-or-smb-p): Rename from `tramp--test-smb-windows-nt-p'. Adapt callees. (tramp--test-check-files): Improve checks for environment variables. (tramp-test33-special-characters) (tramp-test33-special-characters-with-stat) (tramp-test33-special-characters-with-perl) (tramp-test33-special-characters-with-ls, tramp-test34-utf8) (tramp-test34-utf8-with-stat, tramp-test34-utf8-with-perl) (tramp-test34-utf8-with-ls): Add more checks for skip.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/net/tramp-sh.el4
-rw-r--r--lisp/net/tramp.el10
2 files changed, 9 insertions, 5 deletions
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 31ef2efbf20..fbf44b77a12 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -5169,8 +5169,8 @@ Return ATTR."
((tramp-get-method-parameter vec 'tramp-remote-copy-program)
localname)
((not (zerop (length user)))
- (tramp-shell-quote-argument (format "%s@%s:%s" user host localname)))
- (t (tramp-shell-quote-argument (format "%s:%s" host localname))))))
+ (format "%s@%s:%s" user host (shell-quote-argument localname)))
+ (t (format "%s:%s" host (shell-quote-argument localname))))))
(defun tramp-method-out-of-band-p (vec size)
"Return t if this is an out-of-band method, nil otherwise."
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 7987029dc44..da745524a14 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -1691,9 +1691,13 @@ locally on a remote file name. When the local system is a W32 system
but the remote system is Unix, this introduces a superfluous drive
letter into the file name. This function removes it."
(save-match-data
- (if (string-match "\\`[a-zA-Z]:/" name)
- (replace-match "/" nil t name)
- name)))
+ (funcall
+ (if (tramp-compat-file-name-quoted-p name)
+ 'tramp-compat-file-name-quote 'identity)
+ (let ((name (tramp-compat-file-name-unquote name)))
+ (if (string-match "\\`[a-zA-Z]:/" name)
+ (replace-match "/" nil t name)
+ name)))))
;;; Config Manipulation Functions: