sdetweil has asked for the wisdom of the Perl Monks concerning the following question:
the zip file creation is
zip->new() create the objectsomeplace in the last function, we encounter a 'read' error. fh->read() fails..(lib.rchive/Zip/newFileMeber.pm/_readRawChunk())
There is an error handler in the zip module package, so we know which file is causing the problem. (5 of them)..
turns out these files are open for write in another process.. so the error is understandable.. BUT.. if we drop to a commandline, we can COPY the file that we got the read error on without difficulty..
SO.. questions..this 'file' happens to be a logfile for a long running subsystem component. so it might be 'in use' for months.
we coded up a 'workaround' but can't explain why it works..use File::Copy copy(badfile,tempfile); zip->addfile(tempfile); unlink(tempfile);
but why does the copy function work?
Sam
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: archive::zip create, file read error
by roboticus (Chancellor) on Mar 06, 2009 at 13:35 UTC | |
|
Re: archive::zip create, file read error
by Bloodnok (Vicar) on Mar 06, 2009 at 13:07 UTC | |
by AnomalousMonk (Archbishop) on Mar 06, 2009 at 15:17 UTC |