msi: Avoid registering duplicate source list information.

This commit is contained in:
Hans Leidekker 2011-03-07 12:40:20 +01:00 committed by Alexandre Julliard
parent 659db6e902
commit 40ad619ac3
1 changed files with 10 additions and 0 deletions

View File

@ -2567,6 +2567,11 @@ UINT msi_package_add_info(MSIPACKAGE *package, DWORD context, DWORD options,
{
MSISOURCELISTINFO *info;
LIST_FOR_EACH_ENTRY( info, &package->sourcelist_info, MSISOURCELISTINFO, entry )
{
if (!strcmpW( info->value, value )) return ERROR_SUCCESS;
}
info = msi_alloc(sizeof(MSISOURCELISTINFO));
if (!info)
return ERROR_OUTOFMEMORY;
@ -2585,6 +2590,11 @@ UINT msi_package_add_media_disk(MSIPACKAGE *package, DWORD context, DWORD option
{
MSIMEDIADISK *disk;
LIST_FOR_EACH_ENTRY( disk, &package->sourcelist_media, MSIMEDIADISK, entry )
{
if (disk->disk_id == disk_id) return ERROR_SUCCESS;
}
disk = msi_alloc(sizeof(MSIMEDIADISK));
if (!disk)
return ERROR_OUTOFMEMORY;