P is for Practical | |
PerlMonks |
Re^2: unable to extract same file twice using Archive::Zipby Pickwick (Beadle) |
on Jul 06, 2010 at 14:45 UTC ( [id://848230]=note: print w/replies, xml ) | Need Help?? |
Your explanation of WHY you need to extract a particular file (or files) a second time fails the "plausibility test" with me... Maybe I should have been more careful with my question because it's not, that I want to discuss why I have to keep the processing order or why there's even the need to do the processing twice on server and client. I really just wanted to know if one and the same zip member can be extracted more than once. And with one and the same I mean the same object, no zip reloading, nothing. Worse, your simplified code gives no hint of HOW you attempt to unzip a member a second time, Of course it does, I have a zip member on which extractToFileNamed is called twice and the second call fails. nor of HOW you're directing the second attempt to a different directory (to avoid overwriting the first) extractToFileNamed gets a temporary filename each time it's called from File::Temp::tempnam. nowhere do you cite error messages supporting your description of what's happening The error is AZ_STREAM_END as said before, but I don't understand why. The temporary file is created properly, it just gets no data. use a standalone zip program? Why should I day? Archive::Zip is the better tool for my needs. copy the extracted file(s) that need dupes? It's no problem to find another approach, I just wondered why something that easy like extracting a zip member object twice caused me trouble. Close the zip and reopen for your second attempt? Of course I can do that, and I do it now, but why should this be neccessary? The member class doesn't say something about that extracting more than once kills people. If you believe the issue is in your module Of course I don't. ;-)
In Section
Seekers of Perl Wisdom
|
|