1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-07-15 01:04:37 +02:00

Allow NULL path in HRN_STORAGE_PATH_REMOVE() macro.

Update command/backup test to pass NULL where appropriate.
This commit is contained in:
Cynthia Shang
2021-07-19 15:20:43 -04:00
committed by David Steele
parent a6cdf5b22f
commit 1522cb4ed2
2 changed files with 2 additions and 3 deletions

View File

@ -506,9 +506,8 @@ hrnStoragePathRemove(const Storage *const storage, const char *const path, HrnSt
hrnTestResultBegin(__func__, false);
ASSERT(storage != NULL);
ASSERT(path != NULL);
const String *const pathFull = storagePathP(storage, STR(path));
const String *const pathFull = storagePathP(storage, path == NULL ? NULL : STR(path));
printf("remove path '%s'", strZ(pathFull));
hrnTestResultComment(param.comment);

View File

@ -2155,7 +2155,7 @@ testRun(void)
"compare file list");
// Remove test files
HRN_STORAGE_PATH_REMOVE(storagePgIdxWrite(1), "", .recurse = true);
HRN_STORAGE_PATH_REMOVE(storagePgIdxWrite(1), NULL, .recurse = true);
HRN_STORAGE_PATH_REMOVE(storagePgWrite(), "base/1", .recurse = true);
}