@ISA = qw(Exporter IO::File);
-$VERSION = '2.020';
+$VERSION = '2.021';
use constant G_EOF => 0 ;
use constant G_ERR => -1 ;
-use IO::Compress::Base::Common 2.020 ;
+use IO::Compress::Base::Common 2.021 ;
#use Parse::Parameters ;
use IO::File ;
# because the filehandle may not support the offset parameter
# An example is Net::FTP
my $tmp = '';
- *$self->{FH}->read($tmp, $get_size) > 0 &&
+ *$self->{FH}->read($tmp, $get_size) &&
(substr($$out, $offset) = $tmp);
}
else
}
# short circuit if seeking to current offset
- return 1 if $target == $here ;
+ if ($target == $here) {
+ # On ordinary filehandles, seeking to the current
+ # position also clears the EOF condition, so we
+ # emulate this behavior locally while simultaneously
+ # cascading it to the underlying filehandle
+ if (*$self->{Plain}) {
+ *$self->{EndStream} = 0;
+ seek(*$self->{FH},0,1) if *$self->{FH};
+ }
+ return 1;
+ }
# Outlaw any attempt to seek backwards
$self->croakError( *$self->{ClassName} ."::seek: cannot seek backwards")