GNU bug report logs - #18751
25.0.50; Unable to copy hidden (dot) files from remote shared server (Linux) to local machine (OSX).

Previous Next

Package: emacs;

Reported by: Keith David Bershatsky <esq <at> lawlist.com>

Date: Thu, 16 Oct 2014 23:05:02 UTC

Severity: normal

Found in version 25.0.50

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Keith David Bershatsky <esq <at> lawlist.com>
Cc: 18751 <at> debbugs.gnu.org
Subject: bug#18751: 25.0.50; Unable to copy hidden (dot) files from remote shared server (Linux) to local machine (OSX).
Date: Mon, 03 Nov 2014 15:42:44 +0100
Michael Albinus <michael.albinus <at> gmx.de> writes:

Hi Keith,

>> Evaluating `(tramp-do-copy-or-rename-file 'copy filename new-filename
>> t t t)` is working well on all individual files, including
>> `.www.my.cnf`.
>>
>> `dired-do-copy` is working well on all individual files, and on
>> multiple marked files.
>>
>> However, `dired-do-copy` cannot handle any remote directory on the
>> remote server with files inside it.  Placing the cursor on any
>> directory on the remote server and issuing the command `dired-do-copy`
>> results in only that folder being copied to the local machine, but
>> noting inside it gets copied over.
>
> Thanks for this precision. Now I'm able to reproduce the problem, even
> with older Emacs versions.

Finally, I could fix it. I've committed the following patch to the
emacs-24 branch (shall appear in the trunk in a few days):

--8<---------------cut here---------------start------------->8---
*** /home/albinus/src/emacs-24/lisp/net/tramp-sh.el.~117655~	2014-11-03 15:37:00.228854359 +0100
--- /home/albinus/src/emacs-24/lisp/net/tramp-sh.el	2014-11-03 15:22:10.311994500 +0100
***************
*** 2061,2071 ****
  KEEP-DATE is non-nil if NEWNAME should have the same timestamp as FILENAME."
    (with-temp-buffer
      ;; We must disable multibyte, because binary data shall not be
!     ;; converted.
      (set-buffer-multibyte nil)
      (let ((coding-system-for-read 'binary)
! 	  (jka-compr-inhibit t))
!       (insert-file-contents-literally filename))
      ;; We don't want the target file to be compressed, so we let-bind
      ;; `jka-compr-inhibit' to t.
      (let ((coding-system-for-write 'binary)
--- 2061,2075 ----
  KEEP-DATE is non-nil if NEWNAME should have the same timestamp as FILENAME."
    (with-temp-buffer
      ;; We must disable multibyte, because binary data shall not be
!     ;; converted.  `insert-file-contents-literally' does not support
!     ;; file name handlers for GNU Emacs; we must create a local copy
!     ;; therefore.
      (set-buffer-multibyte nil)
      (let ((coding-system-for-read 'binary)
! 	  (jka-compr-inhibit t)
! 	  (tmpfile (file-local-copy filename)))
!       (insert-file-contents-literally (or tmpfile filename))
!       (when tmpfile (delete-file tmpfile)))
      ;; We don't want the target file to be compressed, so we let-bind
      ;; `jka-compr-inhibit' to t.
      (let ((coding-system-for-write 'binary)
--8<---------------cut here---------------end--------------->8---

Could you, please, check it?

Best regards, Michael.




This bug report was last modified 10 years and 251 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.