in reply to Re: Archive::Zip - what am I missing?
in thread Archive::Zip - what am I missing?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Archive::Zip - what am I missing?
by regexes (Hermit) on Apr 10, 2008 at 11:55 UTC | |
I'm trying to replace image1.jpeg in the branch/stick archive directory. Maybe my thought process is incorrect but it would seem to me that a replaceMember method would put the new member in exactly the same location as the old one. It does not appear to be that way... must I declare the archive directory as well? How do I do so? I didn't find any specific methods which appeared to handle this... (of course, I could be overlooking something again.) regexes | [reply] [d/l] |
by nega (Scribe) on Apr 10, 2008 at 18:15 UTC | |
If you want to remove "branch/stick/image1.jpeg" and add "newimage1.jpeg" under "branch/stick/" do this:
| [reply] [d/l] [select] |
by regexes (Hermit) on Apr 11, 2008 at 07:29 UTC | |
The first example... to make newimage1.jpeg become branch/stick/image1.jpeg works correctly. The second example, i.e. to remove branch/stick/image1.jpeg and add newimage1.jpeg under branch/stick did not work. It removes the old image according to removeMember but it does not add newimage1.jpeg to the archive.(using addFile) If I modify the addFile line just to see if it will pack anything.. (I took out the directory path) It does not add the image to the archive directory either. As mentioned by an anonymous monk... I posted above (Re^3: Archive::Zip - what am I missing?), that if I do not use but instead it packs newimage1.jpeg into the archive but not into the correct directory. I also tried... but it did not work either. So to summarize.. it appears that the code below removes the original image (image1.jpeg) but never adds the new image (newimage1.jpeg) at all. Either with or without the archive directory name included. My understanding of the internals of the module is rather low but is this the excpected behaviour? :-)
regexes | [reply] [d/l] [select] |