diff --git a/doc/xml/release.xml b/doc/xml/release.xml
index 236185a0e..67e5c1747 100644
--- a/doc/xml/release.xml
+++ b/doc/xml/release.xml
@@ -45,6 +45,10 @@
Return UnknownError
from errorTypeFromCode()
for invalid error codes.
+
+ Update Perl repo rules to work when stanza is not specified.
+
+
Null-terminate list returned by strLstPtr()
.
diff --git a/lib/pgBackRest/Protocol/Storage/Helper.pm b/lib/pgBackRest/Protocol/Storage/Helper.pm
index 57ca70870..7cce5a110 100644
--- a/lib/pgBackRest/Protocol/Storage/Helper.pm
+++ b/lib/pgBackRest/Protocol/Storage/Helper.pm
@@ -96,7 +96,7 @@ sub storageRepoRule
# Return archive path
if ($strRule eq STORAGE_REPO_ARCHIVE)
{
- $strResultFile = "archive/${strStanza}";
+ $strResultFile = "archive" . (defined($strStanza) ? "/${strStanza}" : '');
# If file is not defined nothing further to do
if (defined($strFile))
@@ -118,7 +118,7 @@ sub storageRepoRule
# Return backup path
elsif ($strRule eq STORAGE_REPO_BACKUP)
{
- $strResultFile = "backup/${strStanza}" . (defined($strFile) ? "/${strFile}" : '');
+ $strResultFile = "backup" . (defined($strStanza) ? "/${strStanza}" : '') . (defined($strFile) ? "/${strFile}" : '');
}
# Else error
else
@@ -164,23 +164,18 @@ sub storageRepo
if (isRepoLocal())
{
# Path rules
- my $hRule;
-
- if ($strStanza ne STORAGE_REPO)
+ my $hRule =
{
- $hRule =
+ &STORAGE_REPO_ARCHIVE =>
{
- &STORAGE_REPO_ARCHIVE =>
- {
- fnRule => \&storageRepoRule,
- xData => $strStanza,
- },
- &STORAGE_REPO_BACKUP =>
- {
- fnRule => \&storageRepoRule,
- xData => $strStanza,
- },
- }
+ fnRule => \&storageRepoRule,
+ xData => $strStanza eq STORAGE_REPO ? undef : $strStanza,
+ },
+ &STORAGE_REPO_BACKUP =>
+ {
+ fnRule => \&storageRepoRule,
+ xData => $strStanza eq STORAGE_REPO ? undef : $strStanza,
+ },
};
# Create the driver