1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2024-12-12 10:04:14 +02:00

Add expression parameter to TEST_STORAGE_LIST() macro.

This commit is contained in:
Cynthia Shang 2021-06-24 13:57:55 -04:00 committed by David Steele
parent 6a1c0337dd
commit 50c129ae9d
2 changed files with 4 additions and 1 deletions

View File

@ -249,7 +249,9 @@ hrnStorageList(
// Generate a list of files/paths/etc
List *list = lstNewP(sizeof(StorageInfo));
storageInfoListP(storage, pathFull, hrnStorageListCallback, list, .sortOrder = sortOrderAsc, .recurse = !param.noRecurse);
storageInfoListP(
storage, pathFull, hrnStorageListCallback, list, .sortOrder = sortOrderAsc, .recurse = !param.noRecurse,
.expression = param.expression != NULL ? STR(param.expression) : NULL);
// Remove files if requested
if (param.remove)

View File

@ -62,6 +62,7 @@ typedef struct HrnStorageListParam
VAR_PARAM_HEADER;
bool remove; // Remove files after testing?
bool noRecurse; // Do not recurse into subdirectories
const char *expression; // Filter the list based on expression
const char *comment; // Comment
} HrnStorageListParam;