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

PGDATA parameter is required for init

This commit is contained in:
Artur Zakirov 2017-02-01 15:40:47 +03:00
parent ba54e494de
commit 7c4c842ce5

6
init.c
View File

@ -38,6 +38,12 @@ do_init(void)
struct dirent **dp;
int results;
/* PGDATA is always required */
if (pgdata == NULL)
elog(ERROR, "Required parameter not specified: PGDATA "
"(-D, --pgdata)");
if (access(backup_path, F_OK) == 0)
{
results = scandir(backup_path, &dp, selects, NULL);