You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-07-17 01:12:23 +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:
committed by
David Steele
parent
a6cdf5b22f
commit
1522cb4ed2
@ -506,9 +506,8 @@ hrnStoragePathRemove(const Storage *const storage, const char *const path, HrnSt
|
|||||||
hrnTestResultBegin(__func__, false);
|
hrnTestResultBegin(__func__, false);
|
||||||
|
|
||||||
ASSERT(storage != NULL);
|
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));
|
printf("remove path '%s'", strZ(pathFull));
|
||||||
hrnTestResultComment(param.comment);
|
hrnTestResultComment(param.comment);
|
||||||
|
@ -2155,7 +2155,7 @@ testRun(void)
|
|||||||
"compare file list");
|
"compare file list");
|
||||||
|
|
||||||
// Remove test files
|
// 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);
|
HRN_STORAGE_PATH_REMOVE(storagePgWrite(), "base/1", .recurse = true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user