[PATCH] msi: Use next cabinet from the media table instead of failing when there is a mismatch with continuous cabinet.

Hans Leidekker hans at codeweavers.com
Thu Sep 27 04:26:26 CDT 2012


On Thu, 2012-09-27 at 09:59 +0200, Christian Costa wrote:

> diff --git a/dlls/msi/media.c b/dlls/msi/media.c
> index 612624d..8a39fcd 100644
> --- a/dlls/msi/media.c
> +++ b/dlls/msi/media.c
> @@ -358,8 +358,18 @@ static INT_PTR cabinet_next_cabinet(FDINOTIFICATIONTYPE fdint,
>  
>      if (strcmpiW( mi->cabinet, cab ))
>      {
> -        ERR("Continuous cabinet does not match the next cabinet in the Media table\n");
> -        goto done;
> +        LPSTR next_cab;
> +
> +        WARN("Continuous cabinet %s does not match the next cabinet %s in the media table\n", debugstr_w(cab), debugstr_w(mi->cabinet));
> +
> +        /* Use cabinet name from the media table */
> +        next_cab = strdupWtoA(mi->cabinet);
> +        /* Modify path to cabinet file with full filename (psz3 points to a 256 bytes buffer that can be modified contrary to psz1 and psz2) */
> +        strcat(pfdin->psz3, "\\");
> +        strcat(pfdin->psz3, next_cab);
> +        /* Path psz3 and cabinet psz1 are concatenated by FDI so just reset psz1 */
> +        *pfdin->psz1 = 0;
> +        msi_free(next_cab);
>      }
>  
>      if (!(cabinet_file = get_cabinet_filename(mi)))

The requirement that the continuous cabinet name matches the next cabinet in the media table
might simply be too strict. Perhaps we need to try them one by one and let FDI decide based
on the setID and iCabinet fields. Can you please add some tests?





More information about the wine-devel mailing list