X-Git-Url: http://git.rot13.org/?p=BackupPC.git;a=blobdiff_plain;f=lib%2FBackupPC%2FPoolWrite.pm;h=a992e7aa2e20188a7765006f5e1328440f94c406;hp=f7624ca7eb8e65f7cdc17389bb12e05a290870da;hb=8f5625f9cdf47f8e04be654c4954838b2df3e26d;hpb=ce708288691ba7dd95a8dac7a468bc0e4c1d6588 diff --git a/lib/BackupPC/PoolWrite.pm b/lib/BackupPC/PoolWrite.pm index f7624ca..a992e7a 100644 --- a/lib/BackupPC/PoolWrite.pm +++ b/lib/BackupPC/PoolWrite.pm @@ -98,8 +98,8 @@ sub new return $self; } -my $BufSize = 1048576; # 1MB or 2^20 -my $MaxFiles = 20; +my $BufSize = 1048576; # 1MB or 2^20 +my $MaxFiles = 20; # max number of compare files open at one time sub write { @@ -119,6 +119,8 @@ sub write # if ( !defined($dataRef) && !defined($a->{digest}) && $a->{fileSize} != length($a->{data}) ) { + #my $newSize = length($a->{data}); + #print("Fixing file size from $a->{fileSize} to $newSize\n"); $a->{fileSize} = length($a->{data}); } @@ -310,6 +312,7 @@ sub write push(@{$a->{errors}}, "Can't rename $a->{fileName} -> $fileName" . " or open during size fixup\n"); } + #print("Using temporary name $fileName\n"); } elsif ( defined($a->{files}) && defined($a->{files}[0]) ) { # # We haven't written anything yet, so just use the @@ -317,6 +320,7 @@ sub write # $fh = $a->{files}[0]->{fh}; $fh->rewind; + #print("Using compare file $a->{files}[0]->{name}\n"); } if ( defined($fh) ) { my $poolWrite = BackupPC::PoolWrite->new($a->{bpc}, $a->{fileName},