Hello,
I have to extract a zip file exactly in the order the files are present in the zip, but some of the files need the contents of other files in the zip which may or may not already have been processed to be processed itself. I tried to solve this by first getting all members I need for processing the special files and if one of those special files is to be processed I just wanted to extract the formerly retrieved files as needed.
The problem is that the formerly retrieved files could already have beend extracted and processed on their own and that every attempt to extract the same member object a second time to another filename failes with AZ_STREAM_END. I just use extractToFileNamed and can't find anything in the docs where is stated that multiple extractions of the same member is not allowed or possible.
Because of the error I tried using endRead() and rewindData() before extracting the member a second time but this didn't change anything. It's really a lot easier, and the files need to be extracted twice are really small, to extract some members twice, rather than storing which member already has been extracted and reuse those files and cleaning up later etc.
The only thing which seems to work, because the algorithm I wanted to change used to work this way before, is to extract all the files I need two times, store the extracted files and recreate the zip-Object using Archive::Zip->new()->read() a second time to process all members. This time they are only extracted ones and the formerly extracted files used as needed.
Is there really no easy way to just extract a zip member twice?
In reply to unable to extract same file twice using Archive::Zip by Pickwick
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |