StorageAPI: Make sure to call noexcept version of CreateSubItem in GetOrCreateSubItem

This commit is contained in:
Maschell 2024-03-29 13:10:45 +01:00
parent 3b5cc2f932
commit 702580152f

View File

@ -85,7 +85,7 @@ std::optional<WUPSStorageSubItem> WUPSStorageSubItem::GetOrCreateSubItem(std::st
wups_storage_item outItem = {};
err = WUPSStorageAPI_GetSubItem(mHandle, key.data(), &outItem);
if (err == WUPS_STORAGE_ERROR_NOT_FOUND) {
return CreateSubItem(key);
return CreateSubItem(key, err);
}
return WUPSStorageSubItem(outItem);
}