diff options
author | Michael Albinus <michael.albinus@gmx.de> | 2011-04-14 20:58:45 +0200 |
---|---|---|
committer | Michael Albinus <michael.albinus@gmx.de> | 2011-04-14 20:58:45 +0200 |
commit | f42efeb5433369af567d67b304a1aab9e90a7127 (patch) | |
tree | ba054daf01d4e6a7a730f7f1384be777f198f68c /lisp | |
parent | 54a8f33734c6dad318c50a4d82c43e3a3684750f (diff) | |
download | emacs-f42efeb5433369af567d67b304a1aab9e90a7127.tar.gz emacs-f42efeb5433369af567d67b304a1aab9e90a7127.tar.bz2 emacs-f42efeb5433369af567d67b304a1aab9e90a7127.zip |
* net/tramp-sh.el (tramp-sh-handle-file-attributes): Handle the
case when the scripts fail. Use `tramp-do-file-attributes-with-ls'
then.
(tramp-do-copy-or-rename-file-out-of-band): Do not check any
longer, whether`executable-find' is bound.
* net/tramp-smb.el (tramp-smb-handle-copy-file): Fix docstring.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ChangeLog | 10 | ||||
-rw-r--r-- | lisp/net/tramp-sh.el | 23 | ||||
-rw-r--r-- | lisp/net/tramp-smb.el | 2 |
3 files changed, 23 insertions, 12 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0fd851c544b..bde1f1174c9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,13 @@ +2011-04-14 Michael Albinus <michael.albinus@gmx.de> + + * net/tramp-sh.el (tramp-sh-handle-file-attributes): Handle the + case when the scripts fail. Use `tramp-do-file-attributes-with-ls' + then. + (tramp-do-copy-or-rename-file-out-of-band): Do not check any + longer, whether`executable-find' is bound. + + * net/tramp-smb.el (tramp-smb-handle-copy-file): Fix docstring. + 2011-04-14 Stefan Monnier <monnier@iro.umontreal.ca> * minibuffer.el (completion-in-region-mode-predicate) diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index ec5c46b2897..cb4aca12edb 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -1145,13 +1145,15 @@ target of the symlink differ." (save-excursion (tramp-convert-file-attributes v - (cond - ((tramp-get-remote-stat v) - (tramp-do-file-attributes-with-stat v localname id-format)) - ((tramp-get-remote-perl v) - (tramp-do-file-attributes-with-perl v localname id-format)) - (t - (tramp-do-file-attributes-with-ls v localname id-format))))))))) + (or + (cond + ((tramp-get-remote-stat v) + (tramp-do-file-attributes-with-stat v localname id-format)) + ((tramp-get-remote-perl v) + (tramp-do-file-attributes-with-perl v localname id-format)) + (t nil)) + ;; The scripts could fail, for example with huge file size. + (tramp-do-file-attributes-with-ls v localname id-format)))))))) (defun tramp-do-file-attributes-with-ls (vec localname &optional id-format) "Implement `file-attributes' for Tramp files using the ls(1) command." @@ -2296,10 +2298,9 @@ The method used must be an out-of-band method." (tramp-get-method-parameter method 'tramp-copy-env)))) ;; Check for program. - (when (and (fboundp 'executable-find) - (not (let ((default-directory - (tramp-compat-temporary-file-directory))) - (executable-find copy-program)))) + (unless (let ((default-directory + (tramp-compat-temporary-file-directory))) + (executable-find copy-program)) (tramp-error v 'file-error "Cannot find copy program: %s" copy-program)) diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el index 7e1b0f5b8e9..36477f7b439 100644 --- a/lisp/net/tramp-smb.el +++ b/lisp/net/tramp-smb.el @@ -339,7 +339,7 @@ pass to the OPERATION." preserve-uid-gid preserve-selinux-context) "Like `copy-file' for Tramp files. KEEP-DATE is not handled in case NEWNAME resides on an SMB server. -PRESERVE-UID-GID is completely ignored." +PRESERVE-UID-GID and PRESERVE-SELINUX-CONTEXT are completely ignored." (setq filename (expand-file-name filename) newname (expand-file-name newname)) (with-progress-reporter |