We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 366073b commit dc50ba7Copy full SHA for dc50ba7
pg_probackup.c
@@ -110,7 +110,7 @@ main(int argc, char *argv[])
110
char path[MAXPGPATH];
111
/* Check if backup_path is directory. */
112
struct stat stat_buf;
113
- int rc = stat(backup_path, &stat_buf);
+ int rc;
114
115
/* initialize configuration */
116
pgBackup_init(¤t);
@@ -164,6 +164,7 @@ main(int argc, char *argv[])
164
elog(ERROR, "required parameter not specified: BACKUP_PATH (-B, --backup-path)");
165
}
166
167
+ rc = stat(backup_path, &stat_buf);
168
/* If rc == -1, there is no file or directory. So it's OK. */
169
if (rc != -1 && !S_ISDIR(stat_buf.st_mode))
170
elog(ERROR, "-B, --backup-path must be a path to directory");
0 commit comments