積丹尼 Dan Jacobson <[email protected]> writes:

Hi Dan,

> Actually wouldn't it be better for TRAMP, to not attempt to uncompress
> when copying files in the first place, just like it did when we sent the
> same file, calling it "N", to keep TRAMP's Customs agents from opening
> up our luggage and (so enthralled by our multicolored underwear, forget
> to put everything back in place, hence revealing this bug.) Really, we
> are not intending to browse the file, just transfer it. So certainly
> TRAMP should do like the FTP command did, and switch into pure binary
> mode.
>
> Same problem happens with
> R runs the command dired-do-rename

Thanks for the report, there is an error, indeed. The appended patch
fixes it. It is on top of Tramp 2.5.1-pre, but I guess the patch applies
also on your Tramp 2.4.

Will be included in Tramp 2.5.0.1, which I plan to release end of this
week via GNU ELPA.

Best regards, Michael.

*** /tmp/ediffbH3AAE	2021-01-27 13:53:52.977038661 +0100
--- /home/albinus/src/tramp/lisp/tramp-adb.el	2021-01-27 13:50:06.700135579 +0100
***************
*** 636,642 ****
        (copy-directory filename newname keep-date t)

      (let ((t1 (tramp-tramp-file-p filename))
! 	  (t2 (tramp-tramp-file-p newname)))
        (with-parsed-tramp-file-name (if t1 filename newname) nil
  	(unless (file-exists-p filename)
  	  (tramp-error
--- 636,645 ----
        (copy-directory filename newname keep-date t)

      (let ((t1 (tramp-tramp-file-p filename))
! 	  (t2 (tramp-tramp-file-p newname))
! 	  ;; We don't want the target file to be compressed, so we
! 	  ;; let-bind `jka-compr-inhibit' to t.
! 	  (jka-compr-inhibit t))
        (with-parsed-tramp-file-name (if t1 filename newname) nil
  	(unless (file-exists-p filename)
  	  (tramp-error
***************
*** 717,723 ****
  	(delete-directory filename 'recursive))

      (let ((t1 (tramp-tramp-file-p filename))
! 	  (t2 (tramp-tramp-file-p newname)))
        (with-parsed-tramp-file-name (if t1 filename newname) nil
  	(unless (file-exists-p filename)
  	  (tramp-error
--- 720,729 ----
  	(delete-directory filename 'recursive))

      (let ((t1 (tramp-tramp-file-p filename))
! 	  (t2 (tramp-tramp-file-p newname))
! 	  ;; We don't want the target file to be compressed, so we
! 	  ;; let-bind `jka-compr-inhibit' to t.
! 	  (jka-compr-inhibit t))
        (with-parsed-tramp-file-name (if t1 filename newname) nil
  	(unless (file-exists-p filename)
  	  (tramp-error

Reply via email to