James Hawkins : msi: Only check the volume label if it' s different than the first media's volume label.
Alexandre Julliard
julliard at winehq.org
Mon Nov 26 08:16:17 CST 2007
Module: wine
Branch: master
Commit: ca9a4dc0d96f7f368ea9def4124780c8ff49e78f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ca9a4dc0d96f7f368ea9def4124780c8ff49e78f
Author: James Hawkins <truiken at gmail.com>
Date: Sun Nov 25 18:02:55 2007 -0600
msi: Only check the volume label if it's different than the first media's volume label.
---
dlls/msi/files.c | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/dlls/msi/files.c b/dlls/msi/files.c
index 6662e4a..229525e 100644
--- a/dlls/msi/files.c
+++ b/dlls/msi/files.c
@@ -62,6 +62,7 @@ struct media_info {
UINT last_sequence;
LPWSTR disk_prompt;
LPWSTR cabinet;
+ LPWSTR first_volume;
LPWSTR volume_label;
BOOL is_continuous;
BOOL is_extracted;
@@ -284,6 +285,9 @@ static UINT msi_media_get_disk_info( MSIPACKAGE *package, struct media_info *mi
mi->cabinet = strdupW(MSI_RecordGetString(row, 4));
mi->volume_label = strdupW(MSI_RecordGetString(row, 5));
+ if (!mi->first_volume)
+ mi->first_volume = strdupW(mi->volume_label);
+
ptr = strrchrW(mi->source, '\\') + 1;
lstrcpyW(ptr, mi->cabinet);
msiobj_release(&row->hdr);
@@ -491,6 +495,7 @@ static void free_media_info( struct media_info *mi )
msi_free( mi->disk_prompt );
msi_free( mi->cabinet );
msi_free( mi->volume_label );
+ msi_free( mi->first_volume );
msi_free( mi );
}
@@ -563,6 +568,9 @@ static UINT load_media_info(MSIPACKAGE *package, MSIFILE *file, struct media_inf
mi->volume_label = strdupW(MSI_RecordGetString(row, 5));
msiobj_release(&row->hdr);
+ if (!mi->first_volume)
+ mi->first_volume = strdupW(mi->volume_label);
+
source_dir = msi_dup_property(package, cszSourceDir);
if (mi->cabinet && mi->cabinet[0] == '#')
@@ -618,7 +626,8 @@ static UINT ready_media(MSIPACKAGE *package, MSIFILE *file, struct media_info *m
}
/* check volume matches, change media if not */
- if (mi->volume_label && mi->disk_id > 1)
+ if (mi->volume_label && mi->disk_id > 1 &&
+ lstrcmpW(mi->first_volume, mi->volume_label))
{
LPWSTR source = msi_dup_property(package, cszSourceDir);
BOOL matches;
More information about the wine-cvs
mailing list