mirror of
https://github.com/postgrespro/pg_probackup.git
synced 2025-01-25 11:53:32 +02:00
[Issue #165] Report errno correctly when failed to access instance directory
This commit is contained in:
parent
fc81de2398
commit
ee3e8d11e3
@ -497,8 +497,14 @@ main(int argc, char *argv[])
|
|||||||
if (backup_subcmd != INIT_CMD && backup_subcmd != ADD_INSTANCE_CMD)
|
if (backup_subcmd != INIT_CMD && backup_subcmd != ADD_INSTANCE_CMD)
|
||||||
{
|
{
|
||||||
if (fio_access(backup_instance_path, F_OK, FIO_BACKUP_HOST) != 0)
|
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",
|
elog(ERROR, "Instance '%s' does not exist in this backup catalog",
|
||||||
instance_name);
|
instance_name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user