msi: Avoid crashing if writeout_cabinet_stream fails.

This commit is contained in:
Mike McCormack 2006-10-27 17:29:19 +09:00 committed by Alexandre Julliard
parent 9375fd9fd3
commit b851d46552
1 changed files with 8 additions and 3 deletions

View File

@ -490,11 +490,16 @@ static UINT ready_media_for_file( MSIPACKAGE *package, struct media_info *mi,
/* the stream does not contain the # character */
if (cab[0]=='#')
{
LPWSTR path;
LPWSTR path, p;
rc = writeout_cabinet_stream(package,&cab[1],mi->source);
if (rc != ERROR_SUCCESS)
return rc;
writeout_cabinet_stream(package,&cab[1],mi->source);
mi->last_path = strdupW(mi->source);
*(strrchrW(mi->last_path,'\\')+1)=0;
p = strrchrW(mi->last_path,'\\');
if (p)
p[1] = 0;
path = msi_dup_property( package, cszSourceDir );