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

Rename storagePath() to storageP() in places where it was missed.

Correct this since it will be enforced in a subsequent patch.
This commit is contained in:
David Steele 2019-11-21 10:21:35 -05:00
parent cef9f0f37f
commit e1dad720a1
6 changed files with 11 additions and 11 deletions

View File

@ -200,7 +200,7 @@ CODE:
// Else a file is specified
else
{
info.name = strBase(storagePath(self, pathExp));
info.name = strBase(storagePathP(self, pathExp));
strCat(data.json, strPtr(storageManifestXsInfo(NULL, &info)));
}

View File

@ -139,7 +139,7 @@ checkPrimary(const DbGetResult dbGroup)
{
LOG_INFO(
"WAL segment %s successfully archived to '%s'", strPtr(walSegment),
strPtr(storagePath(storageRepo(), strNewFmt(STORAGE_REPO_ARCHIVE "/%s/%s", strPtr(archiveId),
strPtr(storagePathP(storageRepo(), strNewFmt(STORAGE_REPO_ARCHIVE "/%s/%s", strPtr(archiveId),
strPtr(walSegmentFile)))));
}
else

View File

@ -355,7 +355,7 @@ removeExpiredArchive(InfoBackup *infoBackup)
if (currentPg.id != archivePgId)
{
String *fullPath = storagePath(
String *fullPath = storagePathP(
storageRepo(), strNewFmt(STORAGE_REPO_ARCHIVE "/%s", strPtr(archiveId)));
storagePathRemoveP(storageRepoWrite(), fullPath, .recurse = true);
LOG_INFO("remove archive path: %s", strPtr(fullPath));

View File

@ -102,9 +102,9 @@ restoreFile(
{
THROW_ON_SYS_ERROR_FMT(
utime(
strPtr(storagePath(storagePg(), pgFile)),
strPtr(storagePathP(storagePg(), pgFile)),
&((struct utimbuf){.actime = pgFileModified, .modtime = pgFileModified})) == -1,
FileInfoError, "unable to set time for '%s'", strPtr(storagePath(storagePg(), pgFile)));
FileInfoError, "unable to set time for '%s'", strPtr(storagePathP(storagePg(), pgFile)));
}
result = false;

View File

@ -1162,7 +1162,7 @@ XS_EUPXS(XS_pgBackRest__LibC__Storage_manifest)
// Else a file is specified
else
{
info.name = strBase(storagePath(self, pathExp));
info.name = strBase(storagePathP(self, pathExp));
strCat(data.json, strPtr(storageManifestXsInfo(NULL, &info)));
}

View File

@ -65,7 +65,7 @@ testRun(void)
TEST_RESULT_UINT(storageInterface(storageRemote).feature, storageInterface(storageTest).feature, " check features");
TEST_RESULT_BOOL(storageFeature(storageRemote, storageFeaturePath), true, " check path feature");
TEST_RESULT_BOOL(storageFeature(storageRemote, storageFeatureCompress), true, " check compress feature");
TEST_RESULT_STR_STR(storagePath(storageRemote, NULL), strNewFmt("%s/repo", testPath()), " check path");
TEST_RESULT_STR_STR(storagePathP(storageRemote, NULL), strNewFmt("%s/repo", testPath()), " check path");
// Check protocol function directly
// -------------------------------------------------------------------------------------------------------------------------
@ -140,7 +140,7 @@ testRun(void)
storagePathCreateP(storageTest, strNew("repo"));
struct utimbuf utimeTest = {.actime = 1000000000, .modtime = 1555160000};
THROW_ON_SYS_ERROR(
utime(strPtr(storagePath(storageTest, strNew("repo"))), &utimeTest) != 0, FileWriteError, "unable to set time");
utime(strPtr(storagePathP(storageTest, strNew("repo"))), &utimeTest) != 0, FileWriteError, "unable to set time");
StorageInfo info = {.exists = false};
TEST_ASSIGN(info, storageInfoP(storageRemote, NULL), "valid path");
@ -177,7 +177,7 @@ testRun(void)
// -------------------------------------------------------------------------------------------------------------------------
TEST_TITLE("special info");
TEST_SYSTEM_FMT("mkfifo -m 666 %s", strPtr(storagePath(storageTest, strNew("repo/fifo"))));
TEST_SYSTEM_FMT("mkfifo -m 666 %s", strPtr(storagePathP(storageTest, strNew("repo/fifo"))));
TEST_ASSIGN(info, storageInfoP(storageRemote, strNew("fifo")), "valid fifo");
TEST_RESULT_PTR(info.name, NULL, " name is not set");
@ -194,7 +194,7 @@ testRun(void)
// -------------------------------------------------------------------------------------------------------------------------
TEST_TITLE("link info");
TEST_SYSTEM_FMT("ln -s ../repo/test %s", strPtr(storagePath(storageTest, strNew("repo/link"))));
TEST_SYSTEM_FMT("ln -s ../repo/test %s", strPtr(storagePathP(storageTest, strNew("repo/link"))));
TEST_ASSIGN(info, storageInfoP(storageRemote, strNew("link")), "valid link");
TEST_RESULT_PTR(info.name, NULL, " name is not set");
@ -305,7 +305,7 @@ testRun(void)
// Path timestamp must be set after file is created since file creation updates it
struct utimbuf utimeTest = {.actime = 1000000000, .modtime = 1555160000};
THROW_ON_SYS_ERROR(utime(strPtr(storagePath(storageRemote, NULL)), &utimeTest) != 0, FileWriteError, "unable to set time");
THROW_ON_SYS_ERROR(utime(strPtr(storagePathP(storageRemote, NULL)), &utimeTest) != 0, FileWriteError, "unable to set time");
TEST_RESULT_BOOL(
storageInfoListP(storageRemote, NULL, hrnStorageInfoListCallback, &callbackData, .sortOrder = sortOrderAsc),