tramp-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tramp (2.2.6-pre); executable-find of nil


From: Michael Albinus
Subject: Re: tramp (2.2.6-pre); executable-find of nil
Date: Mon, 19 Nov 2012 15:36:55 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

Dave Abrahams <address@hidden> writes:

Hi Dave,

>   copy-file("/scpc:cone.local:/usr/local/etc/dovecot/conf.d/10-mail.conf" 
> "/sudo:address@hidden:/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):

--8<---------------cut here---------------start------------->8---
*** /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))

--8<---------------cut here---------------end--------------->8---

Best regards, Michael.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]