file-roller looks at file extention not file header to determine type
Background:
I've found an ancient Firefox bug that causes duplicate remote files (eg file.tar.gz
) to be renamed incorrectly when using "open with" rather than save as if the file has nested extentions.
With 'save' files get duplicate files get named file(1).tar.gz
, file(2).tar.gz
etc. When using "open with", files with nested extensions instead get renamed file.tar-1.gz
, file.tar-2.gz
...
This is a nearly 14 year old bug with FF, so I have no expectation of it actually getting fixed any time soon.
Issue:
If I "open with" file-roller, then the first time I click the file it opens, however the second time, file-roller manages to open the outer gzip encoding and shows file.tar-1
as the contents, but trying to open that file results in an error stating "could not open file.tar-1 - Archive type not supported.
Slightly ironically, though the firefox on windows does suffer this issue, both winrar and 7zip have no problems realising it's a tar archive and opening it.
I got asked in #ubuntu on freenode to raise a bug with yourselves to ascertain why Archive Manager is looking at the extension rather than looking at the magic bytes at the start of the file (as file
would on linux).
Tested on Ubuntu 18.04.3 LTS, file-roller/bionic-updates,bionic-security,now 3.28.0-1ubuntu1.1 amd64.
Greatest of thanks,