Fixed a couple of overlooks in reading an existing file's header.
rkinyon@cpan.org [Fri, 20 Jun 2008 14:34:21 +0000 (14:34 +0000)]
git-svn-id: http://svn.ali.as/cpan/trunk/DBM-Deep@3611 88f4d9cd-8a04-0410-9d60-8f63309c3137

lib/DBM/Deep/Engine/Sector/FileHeader.pm

index a6bb82c..b069065 100644 (file)
@@ -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;
     }
 }