From 6625ea1405aef8b19b0f5e0c347cb1b7f9761747 Mon Sep 17 00:00:00 2001 From: David Steele Date: Thu, 23 Jan 2014 19:39:51 -0500 Subject: [PATCH] Coded paths needed for archive logging --- pg_backrest.pl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pg_backrest.pl b/pg_backrest.pl index 1eb4c4d1b..7681bb79e 100755 --- a/pg_backrest.pl +++ b/pg_backrest.pl @@ -939,7 +939,7 @@ sub path_get # Parse paths on the db side if ($strType eq PATH_DB_ABSOLUTE) { - return $strPath; + return (defined($strPath) ? $strPath : "") . (defined($strFile) ? (defined($strPath) ? "/" : "") . $strFile : ""); } elsif ($strType eq PATH_DB_RELATIVE) { @@ -994,11 +994,12 @@ sub path_get 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; } }