[fpc-pascal] [RFC] Modification to packages/paszlib/src/zipper.pp
Brad Campbell
brad at wasp.net.au
Sun Sep 28 09:26:04 CEST 2008
With reference to this thread..
http://www.nabble.com/FPC-Zip-library-td15145102.html
and the resulting bug entry..
http://bugs.freepascal.org/view.php?id=10787
I had a similar requirement, so I went and had a crack at patching zipper.pas.
It does precisely what _I_ want it to do, but it's not the cleanest of hacks and I wonder if there
is a better way to do it?
I post it here for comment anyway.
In short rather than call ZipFiles(), I now call ZipSomeFiles(). I can then replace the path each
file will appear to have inside the zip file with SetFilePath() prior to calling ZipAllFiles() to
create the zipfile.
I was thinking perhaps it might be better to attach an ansistring to each stringlist.object entry
with a new path prior to calling ZipFiles() instead, but I thought I'd solicit comment first.
Regards,
Brad
--
Dolphins are so intelligent that within a few weeks they can
train Americans to stand at the edge of the pool and throw them
fish.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: zip.patch
Type: text/x-diff
Size: 2255 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20080928/58f35f0e/attachment.patch>
More information about the fpc-pascal
mailing list