my $fio = bless {
blockSize => 700,
logLevel => 0,
- digest => File::RsyncP::Digest->new($options->{protocol_version}),
+ digest => File::RsyncP::Digest->new(),
checksumSeed => 0,
attrib => {},
logHandler => \&logHandler,
%$options,
}, $class;
+ $fio->{digest}->protocol($fio->{protocol_version});
$fio->{shareM} = $fio->{bpc}->fileNameEltMangle($fio->{share});
$fio->{outDir} = "$fio->{xfer}{outDir}/new/";
$fio->{outDirSh} = "$fio->{outDir}/$fio->{shareM}/";
my($fio, $d) = @_;
my($poolWrite);
+ #
+ # Don't write attributes on 2nd phase - they're already
+ # taken care of during the first phase.
+ #
+ return if ( $fio->{phase} > 0 );
if ( !defined($d) ) {
#
# flush all entries (in reverse order)
$fio->logFileAction("skip", {
%{$fio->{viewCache}{$d}{$f}},
name => $name,
- }) if ( $fio->{logLevel} >= 2 );
+ }) if ( $fio->{logLevel} >= 2
+ && $a->{type} == BPC_FTYPE_FILE );
}
} elsif ( !$fio->{full} ) {
##print("Delete file $f\n");
if ( $fio->{logLevel} >= 9 );
$fio->{rxOutFile} = $rxOutFile;
$fio->{rxOutFileRel} = $rxOutFileRel;
- $fio->{rxDigest} = File::RsyncP::Digest->new($fio->{protocol_version});
+ $fio->{rxDigest} = File::RsyncP::Digest->new();
+ $fio->{rxDigest}->protocol($fio->{protocol_version});
$fio->{rxDigest}->add(pack("V", $fio->{checksumSeed}));
}
if ( defined($fio->{rxMatchBlk})
close($fio->{rxInFd}) if ( defined($fio->{rxInFd}) );
unlink("$fio->{outDirSh}RStmp") if ( -f "$fio->{outDirSh}RStmp" );
+ $fio->{phase} = $phase;
#
# Check the final md4 digest
#
# Empty file; just create an empty file digest
#
- $fio->{rxDigest} = File::RsyncP::Digest->new($fio->{protocol_version});
+ $fio->{rxDigest} = File::RsyncP::Digest->new();
+ $fio->{rxDigest}->protocol($fio->{protocol_version});
$fio->{rxDigest}->add(pack("V", $fio->{checksumSeed}));
$newDigest = $fio->{rxDigest}->digest;
}