Thanks, Michael; I've applied the patch locally, and my little test shows that it appears to be working.
on Mon Nov 19 2012, Michael Albinus <michael.albinus-AT-gmx.de> wrote: > Dave Abrahams <[email protected]> writes: > > Hi Dave, > >> copy-file("/scpc:cone.local:/usr/local/etc/dovecot/conf.d/10-mail.conf" >> "/sudo:root@localhost:/opt/local/etc/dovecot/conf.d/10-mail.conf" >> nil t) > > Wow. I haven't tried this constellation yet. Due to the first parameter, > Tramp believes it could apply an out-of-band copy. This doesn't work, > because sudo isn't out-of-band ... > > The following patch ought to fix it (modulo changed line numbers): > > *** /usr/local/src/tramp/lisp/tramp-sh.el.~2.83~ 2012-11-19 > 15:28:37.224176017 +0100 > --- /usr/local/src/tramp/lisp/tramp-sh.el 2012-11-19 > 15:22:28.279929308 +0100 > *************** > *** 2010,2017 **** > ok-if-already-exists keep-date preserve-uid-gid)) > > ;; Try out-of-band operation. > ! ((tramp-method-out-of-band-p > ! v1 (nth 7 (file-attributes (file-truename filename)))) > (tramp-do-copy-or-rename-file-out-of-band > op filename newname keep-date)) > > --- 2010,2020 ---- > ok-if-already-exists keep-date preserve-uid-gid)) > > ;; Try out-of-band operation. > ! ((and > ! (tramp-method-out-of-band-p > ! v1 (nth 7 (file-attributes (file-truename filename)))) > ! (tramp-method-out-of-band-p > ! v2 (nth 7 (file-attributes (file-truename newname))))) > (tramp-do-copy-or-rename-file-out-of-band > op filename newname keep-date)) > > > Best regards, Michael. -- Dave Abrahams BoostPro Computing Software Development Training http://www.boostpro.com Clang/LLVM/EDG Compilers C++ Boost _______________________________________________ Tramp-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/tramp-devel
