Hans Leidekker : msi: Store the disk id for file patches.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Apr 1 10:40:59 CDT 2015
Module: wine
Branch: master
Commit: 0762dd68f8feeaa7698aa4d47cee02507a2c0190
URL: http://source.winehq.org/git/wine.git/?a=commit;h=0762dd68f8feeaa7698aa4d47cee02507a2c0190
Author: Hans Leidekker <hans at codeweavers.com>
Date: Wed Apr 1 12:25:27 2015 +0200
msi: Store the disk id for file patches.
---
dlls/msi/action.c | 23 ++++++++++++++++++++++-
dlls/msi/msipriv.h | 1 +
2 files changed, 23 insertions(+), 1 deletion(-)
diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index d1c46b8..edd08f7 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -1278,7 +1278,7 @@ static UINT load_file(MSIRECORD *row, LPVOID param)
load_file_hash(package, file);
load_file_disk_id(package, file);
- TRACE("File Loaded (%s)\n",debugstr_w(file->File));
+ TRACE("File loaded (file %s sequence %u)\n", debugstr_w(file->File), file->Sequence);
list_add_tail( &package->files, &file->entry );
@@ -1336,6 +1336,25 @@ static UINT load_all_media( MSIPACKAGE *package )
return r;
}
+static UINT load_patch_disk_id( MSIPACKAGE *package, MSIFILEPATCH *patch )
+{
+ static const WCHAR query[] =
+ {'S','E','L','E','C','T',' ','`','D','i','s','k','I','d','`',' ', 'F','R','O','M',' ',
+ '`','M','e','d','i','a','`',' ','W','H','E','R','E',' ',
+ '`','L','a','s','t','S','e','q','u','e','n','c','e','`',' ','>','=',' ','%','u',0};
+ MSIRECORD *rec;
+
+ if (!(rec = MSI_QueryGetRecord( package->db, query, patch->Sequence )))
+ {
+ WARN("query failed\n");
+ return ERROR_FUNCTION_FAILED;
+ }
+
+ patch->disk_id = MSI_RecordGetInteger( rec, 1 );
+ msiobj_release( &rec->hdr );
+ return ERROR_SUCCESS;
+}
+
static UINT load_patch(MSIRECORD *row, LPVOID param)
{
MSIPACKAGE *package = param;
@@ -1365,6 +1384,8 @@ static UINT load_patch(MSIRECORD *row, LPVOID param)
* _StreamRef - External key into MsiPatchHeaders (instead of the header field)
*/
+ load_patch_disk_id( package, patch );
+
TRACE("Patch loaded (file %s sequence %u)\n", debugstr_w(patch->File->File), patch->Sequence);
list_add_tail( &package->filepatches, &patch->entry );
diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h
index ac7ba32..b58dc32 100644
--- a/dlls/msi/msipriv.h
+++ b/dlls/msi/msipriv.h
@@ -594,6 +594,7 @@ typedef struct tagMSIFILEPATCH
INT PatchSize;
INT Attributes;
BOOL IsApplied;
+ UINT disk_id;
} MSIFILEPATCH;
typedef struct tagMSIAPPID
More information about the wine-cvs
mailing list