summaryrefslogtreecommitdiff
path: root/lisp/net/tramp-compat.el
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2017-12-06 20:49:30 +0100
committerMichael Albinus <michael.albinus@gmx.de>2017-12-09 11:33:48 +0100
commit9d9cbafce2d8ca00f61cc276d8a2a08c8211e82d (patch)
tree83090cc3d9f1da817133c00f3e7cb00f6c87b046 /lisp/net/tramp-compat.el
parent01db80046f41c94569efd5dcdb11a1e46b3f16f3 (diff)
downloademacs-9d9cbafce2d8ca00f61cc276d8a2a08c8211e82d.tar.gz
Fix Bug#29579
* lisp/files.el (file-name-non-special): Inhibit `file-name-handler-alist' only for some operations. Add missing operations. (Bug#29579) * lisp/net/tramp-compat.el (tramp-compat-file-name-quote): Do not quote if it is quoted already. * lisp/net/tramp-smb.el (tramp-smb-handle-insert-directory): Use `copy-tree' but `copy-sequence'. * lisp/net/tramp.el (tramp-handle-file-truename): Handle several trailing slashes correctly. * test/lisp/net/tramp-tests.el (tramp-test11-copy-file) (tramp-test12-rename-file, tramp-test24-file-acl) (tramp-test25-file-selinux, tramp--test-check-files): Handle also quoted file names. (tramp-test21-file-links): Fix file name quoting test. (tramp-test24-file-acl): Be more robust for "smb" method. (tramp-test35-make-auto-save-file-name): Enable hidden test cases.
Diffstat (limited to 'lisp/net/tramp-compat.el')
-rw-r--r--lisp/net/tramp-compat.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el
index 9326f7b1864..9cdfc065128 100644
--- a/lisp/net/tramp-compat.el
+++ b/lisp/net/tramp-compat.el
@@ -210,8 +210,10 @@ If NAME is a remote file name, check the local part of NAME."
(defsubst tramp-compat-file-name-quote (name)
"Add the quotation prefix \"/:\" to file NAME.
If NAME is a remote file name, the local part of NAME is quoted."
- (concat
- (file-remote-p name) "/:" (or (file-remote-p name 'localname) name))))
+ (if (tramp-compat-file-name-quoted-p name)
+ name
+ (concat
+ (file-remote-p name) "/:" (or (file-remote-p name 'localname) name)))))
(if (fboundp 'file-name-unquote)
(defalias 'tramp-compat-file-name-unquote 'file-name-unquote)