[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 51537b9: Some minor Tramp tweaks
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] master 51537b9: Some minor Tramp tweaks |
Date: |
Wed, 28 Feb 2018 09:10:27 -0500 (EST) |
branch: master
commit 51537b9e4937d7853647871dc264f0be9412a9fa
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>
Some minor Tramp tweaks
* lisp/net/tramp-adb.el (tramp-adb-get-ls-command): Fix docstring.
* lisp/net/tramp-sh.el (tramp-vc-registered-read-file-names):
Quote file.
* lisp/net/tramp.el (tramp-handle-substitute-in-file-name):
Make it more robust.
---
lisp/net/tramp-adb.el | 2 +-
lisp/net/tramp-sh.el | 10 ++++++----
lisp/net/tramp.el | 2 +-
3 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el
index cb80506..7ac61b8 100644
--- a/lisp/net/tramp-adb.el
+++ b/lisp/net/tramp-adb.el
@@ -458,7 +458,7 @@ pass to the OPERATION."
result)))))))))
(defun tramp-adb-get-ls-command (vec)
- "Determine `ls' command at its arguments."
+ "Determine `ls' command and its arguments."
(with-tramp-connection-property vec "ls"
(tramp-message vec 5 "Finding a suitable `ls' command")
(cond
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index ff5d404..f619ac3 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -962,15 +962,16 @@ busybox awk '{}' </dev/null"
(defconst tramp-vc-registered-read-file-names
"echo \"(\"
while read file; do
+ quoted=`echo \"$file\" | sed -e \"s/\\\"/\\\\\\\\\\\\\\\\\\\"/\"`
if %s \"$file\"; then
- echo \"(\\\"$file\\\" \\\"file-exists-p\\\" t)\"
+ echo \"(\\\"$quoted\\\" \\\"file-exists-p\\\" t)\"
else
- echo \"(\\\"$file\\\" \\\"file-exists-p\\\" nil)\"
+ echo \"(\\\"$quoted\\\" \\\"file-exists-p\\\" nil)\"
fi
if %s \"$file\"; then
- echo \"(\\\"$file\\\" \\\"file-readable-p\\\" t)\"
+ echo \"(\\\"$quoted\\\" \\\"file-readable-p\\\" t)\"
else
- echo \"(\\\"$file\\\" \\\"file-readable-p\\\" nil)\"
+ echo \"(\\\"$quoted\\\" \\\"file-readable-p\\\" nil)\"
fi
done
echo \")\""
@@ -2054,6 +2055,7 @@ file names."
(t2 (tramp-tramp-file-p newname))
(length (tramp-compat-file-attribute-size
(file-attributes (file-truename filename))))
+ ;; `file-extended-attributes' exists since Emacs 24.4.
(attributes (and preserve-extended-attributes
(apply 'file-extended-attributes (list filename)))))
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index bae039d..6011239 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -3564,7 +3564,7 @@ support symbolic links."
(concat (file-remote-p filename)
(substitute-in-file-name localname))))))
;; "/m:h:~" does not work for completion. We use "/m:h:~/".
- (if (string-match "^~$" localname)
+ (if (and (stringp localname) (string-equal "~" localname))
(concat filename "/")
filename))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 51537b9: Some minor Tramp tweaks,
Michael Albinus <=