# HG changeset patch # User Michael Albinus # Date 1267356999 -3600 # Node ID 122dff72a8ee96c4292b46cd237f112e151e54ba # Parent 6ea11661a51618f05dbaa70bd0800e43c20325e2 * net/tramp.el (tramp-handle-write-region): START can be a string. Take care in the checks. diff -r 6ea11661a516 -r 122dff72a8ee lisp/ChangeLog --- a/lisp/ChangeLog Sun Feb 28 11:27:39 2010 +0100 +++ b/lisp/ChangeLog Sun Feb 28 12:36:39 2010 +0100 @@ -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 -r 6ea11661a516 -r 122dff72a8ee lisp/net/tramp.el --- a/lisp/net/tramp.el Sun Feb 28 11:27:39 2010 +0100 +++ b/lisp/net/tramp.el Sun Feb 28 12:36:39 2010 +0100 @@ -5045,11 +5045,12 @@ ;; 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))