From 00cffdeb90bc80bf9d5cd73e350083573780f742 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Sun, 28 Feb 2010 12:36:39 +0100 Subject: [PATCH] * net/tramp.el (tramp-handle-write-region): START can be a string. Take care in the checks. --- lisp/ChangeLog | 6 ++++++ lisp/net/tramp.el | 7 ++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cd06672cfb9..329139951a9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2010-02-28 Michael Albinus + + * net/tramp.el (tramp-handle-write-region): START can be a string. + Take care in the checks. Reported by Dan Davison + . + 2010-02-28 Michael Albinus * net/dbus.el (dbus-introspect, dbus-get-property) diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 102117f82e9..0957c78eddf 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -5045,11 +5045,12 @@ Returns a file name in `tramp-auto-save-directory' for autosaving this file." ;; encoding function, then that is used for encoding the ;; contents of the tmp file. (cond - ;; `rename-file' handles direct copy and out-of-band methods. + ;; `copy-file' handles direct copy and out-of-band methods. ((or (tramp-local-host-p v) (tramp-method-out-of-band-p - v (- (or end (point-max)) (or start (point-min))))) - (if (and (= (or end (point-max)) (point-max)) + v (nth 7 (file-attributes tmpfile)))) + (if (and (not (stringp start)) + (= (or end (point-max)) (point-max)) (= (or start (point-min)) (point-min)) (tramp-get-method-parameter method 'tramp-copy-keep-tmpfile)) -- 2.39.2