1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2024-12-11 11:41:33 +02:00

[Issue #343] redundant errno check when reading "/backup_dir/backups/instance_name" directory

This commit is contained in:
Grigory Smolkin 2021-03-07 18:34:45 +03:00
parent e0dfc9c89e
commit 916ffb6d91

View File

@ -972,17 +972,11 @@ catalog_get_backup_list(const char *instance_name, time_t requested_backup_id)
continue;
}
parray_append(backups, backup);
if (errno && errno != ENOENT)
{
elog(WARNING, "cannot read data directory \"%s\": %s",
data_ent->d_name, strerror(errno));
goto err_proc;
}
}
if (errno)
{
elog(WARNING, "cannot read backup root directory \"%s\": %s",
elog(WARNING, "Cannot read backup root directory \"%s\": %s",
backup_instance_path, strerror(errno));
goto err_proc;
}