On 2019-01-23, Stefan Bodewig wrote: > On 2019-01-21, Albretch Mueller wrote:
>> I downloaded this file using wget: >> >> http://dumps.wikimedia.your.org/other/static_html_dumps/2008-06/en/wikipedia-en-html.tar.7z >> and it seems to be fine: > ... >> $ 7z l "${_IFL}" > ... >> Date Time Attr Size Compressed Name >> ------------------- ----- ------------ ------------ ------------------------ >> 2008-06-18 13:02:15 ..... 223674511360 15363543113 wikipedia-en-html.tar >> ------------------- ----- ------------ ------------ ------------------------ >> 2008-06-18 13:02:15 223674511360 15363543113 1 files >> But when I try to use apache.compress I can get the name of the >> compressed/contained file even though ark and 7z show it to you. > I get the same results. It looks as if the archive was doing something > unusual. I'm really sorry it took me seven months to find enough time to dive in deep enough. > Watching Commons Compress while it reads the archive shows the archive > does not contain any file names inside of the "FilesInfo" part which is > why "null" is returned as name. This turned out to be true. The archive simply doesn't contain any name of the entry at all. The 7z command line tool (as well as other "UI" parts of the 7zip tools) contains a special logic for unnamed entries and derives a default name from the name of the archive itself https://github.com/kornelski/7z/blob/master/CPP/7zip/UI/Common/DefaultName.cpp Compress 1.19 (not released, yet) will contain a getDefaultName method that contains the same logic and an option to provide the default name for entries with a null name. It will not be on by default as a decision like this really should be taken at a layer on top of Compress - much like it is taken at the UI layer inside of the 7zip tools. Stefan --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org