1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-01-18 04:58:51 +02:00

Accept NULL filenames in hrnStorageInfoListCallback().

This allows it to be used with StorageInfo objects returned from storageInfo(), which do not contain a filename.
This commit is contained in:
David Steele 2020-07-31 16:35:58 -04:00
parent a8e47c38c6
commit caef2ba482

View File

@ -71,7 +71,7 @@ hrnStorageInfoListCallback(void *callbackData, const StorageInfo *info)
if (data->rootPathOmit && info->type == storageTypePath && strEq(info->name, DOT_STR)) if (data->rootPathOmit && info->type == storageTypePath && strEq(info->name, DOT_STR))
return; return;
strCatFmt(data->content, "%s {", strZ(info->name)); strCatFmt(data->content, "%s {", info->name == NULL ? NULL_Z : strZ(info->name));
if (info->level > storageInfoLevelExists) if (info->level > storageInfoLevelExists)
{ {