1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2025-02-01 13:27:47 +02:00

Fix archive-get compressed error

This commit is contained in:
Konstantin Knizhnik 2019-03-28 15:56:27 +03:00
parent fefe8b14e8
commit a0d65fa1c6

View File

@ -1315,13 +1315,13 @@ get_wal_file(const char *from_path, const char *to_path)
/* copy content */
for (;;)
{
size_t read_len = 0;
int read_len = 0;
#ifdef HAVE_LIBZ
if (is_decompress)
{
read_len = fio_gzread(gz_in, buf, sizeof(buf));
if (read_len != sizeof(buf) && !fio_gzeof(gz_in))
if (read_len <= 0 && !fio_gzeof(gz_in))
{
errno_temp = errno;
fio_unlink(to_path_temp, FIO_DB_HOST);