1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2024-12-14 10:13:05 +02:00

Fixed bug in File->hash() and removed improper last statements from do loops.

This commit is contained in:
David Steele 2015-03-02 23:42:55 -05:00
parent 7dbb11e8b8
commit c0ec62b131
2 changed files with 3 additions and 6 deletions

View File

@ -802,7 +802,7 @@ sub hash_size
if ($bCompressed) if ($bCompressed)
{ {
($strHash, $iSize) = ($strHash, $iSize) =
$self->{oRemote}->binary_xfer($hFile, undef, 'in', undef, false, false); $self->{oRemote}->binary_xfer($hFile, undef, 'in', true, false, false);
} }
else else
{ {

View File

@ -677,10 +677,9 @@ sub binary_xfer
else else
{ {
$iBlockSize = 0; $iBlockSize = 0;
last;
} }
} }
while ($iZLibStatus == Z_OK && $iUncompressedBufferSize > 0); while ($iZLibStatus == Z_OK && $iUncompressedBufferSize > 0 && $iBlockSize > 0);
} }
} }
while ($iBlockSize > 0); while ($iBlockSize > 0);
@ -803,7 +802,6 @@ sub binary_xfer
else else
{ {
$iBlockSize = 0; $iBlockSize = 0;
last;
} }
} }
@ -927,10 +925,9 @@ sub binary_xfer
else else
{ {
$iBlockSize = 0; $iBlockSize = 0;
last;
} }
} }
while ($iZLibStatus == Z_OK && $iUncompressedBufferSize > 0); while ($iZLibStatus == Z_OK && $iUncompressedBufferSize > 0 && $iBlockSize > 0);
} }
} }
} }