From: rkinyon@cpan.org Date: Fri, 20 Jun 2008 14:34:21 +0000 (+0000) Subject: Fixed a couple of overlooks in reading an existing file's header. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=80656ce3c356053e563c882733b5bf66307c9c20;p=dbsrgits%2FDBM-Deep.git Fixed a couple of overlooks in reading an existing file's header. git-svn-id: http://svn.ali.as/cpan/trunk/DBM-Deep@3611 88f4d9cd-8a04-0410-9d60-8f63309c3137 --- diff --git a/lib/DBM/Deep/Engine/Sector/FileHeader.pm b/lib/DBM/Deep/Engine/Sector/FileHeader.pm index a6bb82c..b069065 100644 --- a/lib/DBM/Deep/Engine/Sector/FileHeader.pm +++ b/lib/DBM/Deep/Engine/Sector/FileHeader.pm @@ -108,7 +108,10 @@ sub _init { my $bl = $e->txn_bitfield_len; $e->set_chains_loc( $header_fixed + scalar(@values) + $bl + $DBM::Deep::Engine::STALE_SIZE * ($e->num_txns - 1) ); - $self->{is_new} = 1; + # Make sure we set up the string so that the caching works. -RobK, 2008-06-20 + $self->{string} = $buffer . $buffer2; + + $self->{is_new} = 0; } }