[Top][All Lists]

[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,
  -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:
  -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

emacs-version "27.1"
tramp-version ""
My dot files are all public at

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 
uncompressing OSMTracker.sqlitedb.gz...done
Copying /adb::/sdcard/OSMTracker.sqlitedb.gz to 
Renaming /adb::/sdcard/OSMTracker.sqlitedb.gz to 
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]