bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#35495: 27.0.50; Untarring an archive with a keyring.gpg inside


From: Federico Tedin
Subject: bug#35495: 27.0.50; Untarring an archive with a keyring.gpg inside
Date: Thu, 09 May 2019 20:00:42 -0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux)

Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

>> Would it be OK to just remove the `epa-file-handler` from
>> `file-name-handler-alist` while extracting?
>
> I don't like this idea.  How does jka-compr do it?
>
>
>         Stefan

(My attempt at understanding what's causing the issue)

It looks like `jka-compr-write-region` does not do any compression if
`file`'s extension does not match any of the extensions defined in
`jka-compr-compression-info-list`. Writing to a file ending in ".gpg"
just uses `epa-file-handler`, then.

I found that `tar-copy` has the same problem that `tar-untar-buffer`
has. However, `tar-copy` has a small check where if the source file is
compressed and the destination file should be compressed, the jka-compr
file handler is disabled, as no conversion needs to be done. Maybe
something similar could be done for .gpg files. If the file inside the
tarfile is already encrypted and it is being extracted to
<somewhere>.gpg, then the regular `write-region` should be used
(i.e. just copy bytes from one place to another).





reply via email to

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