Subject: | Enhanced support for changing files patch |
When the source file is changing sizes such as a log file the attached
attempts to correct the size of the source file.
We have been running the attached for quite some time now with great
success, so thought it time to submit it.
Subject: | patch-Member.pm |
--- Member.pm.orig 2007-11-07 13:02:24.000000000 +0000
+++ Member.pm 2008-01-23 03:31:51.000000000 +0000
@@ -883,4 +883,11 @@
$self->{'writeLocalHeaderRelativeOffset'} = $offset;
$self->{'wasWritten'} = 0;
+ # update the size
+ my $fn = $self->externalFileName();
+ if ( $fn && 'Archive::Zip::NewFileMember' eq ref( $self ) && -f $fn )
+ {
+ my $size = -s $fn;
+ $self->{'uncompressedSize'} = $size if ( defined $size );
+ }
# Determine if I need to write a data descriptor