On Tue, Jan 12, 2010 at 10:11:04PM -0500, Scott Gifford wrote:
> On Tue, Jan 12, 2010 at 7:49 AM, Thomas den Braber <tho...@delos.nl> wrote:
> [ ... ]
> 
> > The error is: 'IO error: seeking to rewrite local header : Invalid
> > argument'
> >
> 
> That error means that after writing something to the ZIP archive, it tried
> to go backwards to put what it just wrote in the header, but found it
> couldn't do that because it's output is going over the network and what's
> already sent can't be changed.
> 
> A temporary file is certainly one fix, as people here have suggested.  The
> fact that it used to work means that it must be possible to generate a ZIP
> file without seeking around, so my advice would be to poke around in the
> options and see if you find anything useful.

The second argument to writeToFileHandle is supposed to address that:

writeToFileHandle( $fileHandle [, $seekable] )

    Write a zip archive to a file handle. Return AZ_OK on success. The
    optional second arg tells whether or not to try to seek backwards to
    re-write headers.

    ...

    If you pass a file handle that is not seekable (like if you're writing
    to a pipe or a socket), pass a false second argument:

    ...

Thomas, are you sure the actual code in question is passing a false value
as the second argument?

Ronald

Reply via email to