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

[Issue #165] Report errno correctly when failed to access instance directory

This commit is contained in:
Grigory Smolkin 2019-12-27 01:17:22 +03:00
parent fc81de2398
commit ee3e8d11e3

View File

@ -497,8 +497,14 @@ main(int argc, char *argv[])
if (backup_subcmd != INIT_CMD && backup_subcmd != ADD_INSTANCE_CMD)
{
if (fio_access(backup_instance_path, F_OK, FIO_BACKUP_HOST) != 0)
{
elog(WARNING, "Failed to access directory \"%s\": %s",
backup_instance_path, strerror(errno));
// TODO: redundant message, should we get rid of it?
elog(ERROR, "Instance '%s' does not exist in this backup catalog",
instance_name);
}
}
}