1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-01-30 05:39:12 +02:00

Coded paths needed for archive logging

This commit is contained in:
David Steele 2014-01-23 19:39:51 -05:00
parent cdd1ef7306
commit 6625ea1405

View File

@ -939,7 +939,7 @@ sub path_get
# Parse paths on the db side # Parse paths on the db side
if ($strType eq PATH_DB_ABSOLUTE) if ($strType eq PATH_DB_ABSOLUTE)
{ {
return $strPath; return (defined($strPath) ? $strPath : "") . (defined($strFile) ? (defined($strPath) ? "/" : "") . $strFile : "");
} }
elsif ($strType eq PATH_DB_RELATIVE) elsif ($strType eq PATH_DB_RELATIVE)
{ {
@ -994,11 +994,12 @@ sub path_get
if ($strArchive !~ /^([0-F]){24}$/) if ($strArchive !~ /^([0-F]){24}$/)
{ {
croak &log(ERROR, "\$strFile not a valid archive file"); croak &log(ERROR, "$strFile not a valid archive file");
} }
} }
return $strBackupClusterPath . "/archive" . (defined($strArchive) ? "/${strArchive}" : ""); return $strBackupClusterPath . "/archive" . (defined($strArchive) ? "/" .
substr($strArchive, 0, 16) : "") . "/" . $strFile;
} }
} }