Commit 85fea53a authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

msi: Only perform the media check if the label of the disk entry differs from the last.

parent a853bb6d
......@@ -664,6 +664,7 @@ void msi_free_media_info(MSIMEDIAINFO *mi)
msi_free(mi->disk_prompt);
msi_free(mi->cabinet);
msi_free(mi->volume_label);
msi_free(mi->last_volume);
msi_free(mi);
}
......@@ -898,7 +899,10 @@ UINT ready_media( MSIPACKAGE *package, BOOL compressed, MSIMEDIAINFO *mi )
}
}
/* check volume matches, change media if not */
if (mi->volume_label && mi->disk_id > 1)
if (mi->volume_label)
{
/* assume first volume is in the drive */
if (mi->last_volume && strcmpiW( mi->last_volume, mi->volume_label ))
{
WCHAR *source = msi_dup_property( package->db, szSourceDir );
BOOL match = source_matches_volume( mi, source );
......@@ -913,6 +917,10 @@ UINT ready_media( MSIPACKAGE *package, BOOL compressed, MSIMEDIAINFO *mi )
}
}
}
msi_free(mi->last_volume);
mi->last_volume = strdupW(mi->volume_label);
}
if (mi->cabinet)
{
if (compressed && GetFileAttributesW( cabinet_file ) == INVALID_FILE_ATTRIBUTES)
......
......@@ -173,6 +173,7 @@ typedef struct tagMSIMEDIAINFO
LPWSTR disk_prompt;
LPWSTR cabinet;
LPWSTR volume_label;
LPWSTR last_volume;
BOOL is_continuous;
BOOL is_extracted;
WCHAR sourcedir[MAX_PATH];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment