tramp-devel
[Top][All Lists]
Advanced

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

TRAMP's Customs agents open up our .gz luggage and forget...


From: 積丹尼 Dan Jacobson
Subject: TRAMP's Customs agents open up our .gz luggage and forget...
Date: Wed, 27 Jan 2021 00:37:59 +0800

Today I discovered,
let's say one has, on their cellphone,
  /adb::/sdcard/osmtracker:
  -rw-rw----  1 root sdcard_rw 3606065 2018-06-25  N
  -rw-rw----  1 root sdcard_rw 3606065 2018-06-25  OSMTracker.sqlitedb.gz
and uses
C runs the command dired-do-copy
to copy them to /tmp , one their computer.

Well, here's what the result is:
  /tmp:
  -rw-rw----  1 jidanni 3606065 2018-06-25  N
  -rw-------  1 jidanni 9449472 2018-06-25  OSMTracker.sqlitedb.gz

That's right. TRAMP, sniffing the ".gz" from the filename, uncompresses
the file, copies it, (then forgets to recompress it,) but still adds the
".gz" back on.

If one wants such files to cross intact, the user had better remove any
".gz" from their filenames.

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.

emacs-version "27.1"
tramp-version "2.4.3.27.1"
My dot files are all public at
https://www.jidanni.org/comp/configuration/

Same problem happens with
R runs the command dired-do-rename

Renaming /adb::/sdcard/OSMTracker.sqlitedb.gz to /tmp/OSMTracker.sqlitedb.gz...
Copying /adb::/sdcard/OSMTracker.sqlitedb.gz to /tmp/OSMTracker.sqlitedb.gz...
Tramp: Fetching /adb::/sdcard/OSMTracker.sqlitedb.gz to tmp file 
/tmp/tramp.XHky2i.gz...done
uncompressing OSMTracker.sqlitedb.gz...done
Copying /adb::/sdcard/OSMTracker.sqlitedb.gz to 
/tmp/OSMTracker.sqlitedb.gz...done
Renaming /adb::/sdcard/OSMTracker.sqlitedb.gz to 
/tmp/OSMTracker.sqlitedb.gz...done
Move: 1 of 1
Move: 1 file done

It only says uncompressing. I.e., it never recompresses it. However it
slaps the ".gz" back on anyway.



reply via email to

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