Skip to content

Commit 7efada4

Browse files
committed
fix bug in catalog structure for multiple instance backup
1 parent 66d3e97 commit 7efada4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

catalog.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -631,12 +631,12 @@ pgBackupGetPath2(const pgBackup *backup, char *path, size_t len,
631631

632632
/* If "subdir1" is NULL do not check "subdir2" */
633633
if (!subdir1)
634-
snprintf(path, len, "%s/%s/%s", backup_path, BACKUPS_DIR, datetime);
634+
snprintf(path, len, "%s/%s", backup_instance_path, datetime);
635635
else if (!subdir2)
636-
snprintf(path, len, "%s/%s/%s/%s", backup_path, BACKUPS_DIR, datetime, subdir1);
636+
snprintf(path, len, "%s/%s/%s", backup_instance_path, datetime, subdir1);
637637
/* "subdir1" and "subdir2" is not NULL */
638638
else
639-
snprintf(path, len, "%s/%s/%s/%s/%s", backup_path, BACKUPS_DIR,
639+
snprintf(path, len, "%s/%s/%s/%s", backup_instance_path,
640640
datetime, subdir1, subdir2);
641641

642642
free(datetime);

0 commit comments

Comments
 (0)