;; to be quoted. OpenSSH 8 supports disabling of strict file name
;; checking in scp, we use it when available.
(unless (string-match-p "ftp$" method)
- (setq localname (shell-quote-argument localname)))
+ (setq localname (tramp-unquote-shell-quote-argument localname)))
(cond
((tramp-get-method-parameter vec 'tramp-remote-copy-program)
localname)
"Remove quotation prefix \"/:\" from string S, and quote it then for shell.
Suppress `shell-file-name'. This is needed on w32 systems, which
would use a wrong quoting for local file names. See `w32-shell-name'."
- (let (shell-file-name)
- (shell-quote-argument (tramp-compat-file-name-unquote s))))
+ (if (eq system-type 'windows-nt)
+ (let ((result (tramp-compat-file-name-unquote s)))
+ (setq result (tramp-compat-string-replace "\"" "\"\"" result))
+ (concat "\"" result "\""))
+ (let (shell-file-name)
+ (shell-quote-argument (tramp-compat-file-name-unquote s)))))
;; Currently (as of Emacs 20.5), the function `shell-quote-argument'
;; does not deal well with newline characters. Newline is replaced by
(make-directory tmp-name2)
(dolist (elt files)
+ ;(tramp--test-message "%s" elt)
(let* ((file1 (expand-file-name elt tmp-name1))
(file2 (expand-file-name elt tmp-name2))
(file3 (expand-file-name (concat elt "foo") tmp-name1)))
"\tfoo bar baz\t")
(t " foo\tbar baz\t"))
"@foo@bar@baz@"
- "$foo$bar$$baz$"
+ (unless (tramp--test-windows-nt-and-scp-p)
+ "$foo$bar$$baz$")
"-foo-bar-baz-"
"%foo%bar%baz%"
"&foo&bar&baz&"
"'foo'bar'baz'"
"'foo\"bar'baz\"")
"#foo~bar#baz~"
- (if (or (tramp--test-gvfs-p) (tramp--test-windows-nt-or-smb-p))
- "!foo!bar!baz!"
- "!foo|bar!baz|")
+ (unless (tramp--test-windows-nt-and-scp-p)
+ (if (or (tramp--test-gvfs-p) (tramp--test-windows-nt-or-smb-p))
+ "!foo!bar!baz!"
+ "!foo|bar!baz|"))
(if (or (tramp--test-gvfs-p)
(tramp--test-rclone-p)
(tramp--test-windows-nt-or-smb-p))
"Check special characters in file names."
(skip-unless (tramp--test-enabled))
(skip-unless (not (tramp--test-rsync-p)))
-; (skip-unless (not (tramp--test-windows-nt-and-scp-p)))
(skip-unless (or (tramp--test-emacs26-p) (not (tramp--test-rclone-p))))
(tramp--test-special-characters))
(skip-unless (tramp--test-enabled))
(skip-unless (tramp--test-sh-p))
(skip-unless (not (tramp--test-rsync-p)))
-; (skip-unless (not (tramp--test-windows-nt-and-scp-p)))
;; We cannot use `tramp-test-vec', because this fails during compilation.
(with-parsed-tramp-file-name tramp-test-temporary-file-directory nil
(skip-unless (tramp-get-remote-stat v)))
(skip-unless (tramp--test-enabled))
(skip-unless (tramp--test-sh-p))
(skip-unless (not (tramp--test-rsync-p)))
-; (skip-unless (not (tramp--test-windows-nt-and-scp-p)))
;; We cannot use `tramp-test-vec', because this fails during compilation.
(with-parsed-tramp-file-name tramp-test-temporary-file-directory nil
(skip-unless (tramp-get-remote-perl v)))
(skip-unless (tramp--test-enabled))
(skip-unless (tramp--test-sh-p))
(skip-unless (not (tramp--test-rsync-p)))
-; (skip-unless (not (tramp--test-windows-nt-and-scp-p)))
(let ((tramp-connection-properties
(append