MSI: custom.c quoting fixes
Aric Stewart
aric at codeweavers.com
Thu May 19 10:07:01 CDT 2005
Correct query quoting based on Mike's patch.
also more error messages about return codes from custom actions and
ignore an error that we should be ignoring.
-------------- next part --------------
Index: dlls/msi/custom.c
===================================================================
RCS file: /home/wine/wine/dlls/msi/custom.c,v
retrieving revision 1.12
diff -u -r1.12 custom.c
--- dlls/msi/custom.c 27 Apr 2005 10:16:57 -0000 1.12
+++ dlls/msi/custom.c 19 May 2005 15:04:42 -0000
@@ -80,9 +80,10 @@
MSIQUERY * view;
MSIRECORD * row = 0;
static const WCHAR ExecSeqQuery[] =
- {'s','e','l','e','c','t',' ','*',' ','f','r','o','m',' ','C','u','s','t','o'
- ,'m','A','c','t','i','o','n',' ','w','h','e','r','e',' ','`','A','c','t','i'
- ,'o','n','`',' ','=',' ','`','%','s','`',0};
+ {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
+ '`','C','u','s','t','o' ,'m','A','c','t','i','o','n','`',
+ ' ','W','H','E','R','E',' ','`','A','c','t','i' ,'o','n','`',' ',
+ '=',' ','\'','%','s','\'',0};
UINT type;
LPWSTR source;
LPWSTR target;
@@ -251,8 +252,9 @@
MSIQUERY * view;
MSIRECORD * row = 0;
static const WCHAR fmt[] =
- {'s','e','l','e','c','t',' ','*',' ','f','r','o','m',' ','B','i'
-,'n','a','r','y',' ','w','h','e','r','e',' ','N','a','m','e','=','`','%','s','`',0};
+ {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
+ '`','B','i' ,'n','a','r','y','`',' ','W','H','E','R','E',
+ ' ','`','N','a','m','e','`',' ','=',' ','\'','%','s','\'',0};
HANDLE the_file;
CHAR buffer[1024];
@@ -333,7 +335,7 @@
static UINT process_action_return_value(UINT type, HANDLE ThreadHandle)
{
- DWORD rc;
+ DWORD rc=0;
if (type == 2)
{
@@ -357,7 +359,8 @@
case ERROR_NO_MORE_ITEMS:
return ERROR_SUCCESS;
default:
- return ERROR_FUNCTION_FAILED;
+ ERR("Invalid Return Code %lx\n",rc);
+ return ERROR_INSTALL_FAILURE;
}
}
@@ -479,7 +482,7 @@
stuff = (thread_struct*)info;
rc = ACTION_CallDllFunction(stuff);
- TRACE("MSI Thread (0x%lx) finished\n",GetCurrentThreadId());
+ TRACE("MSI Thread (0x%lx) finished (rc %li)\n",GetCurrentThreadId(), rc);
/* clse all handles for this thread */
MsiCloseAllHandles();
return rc;
@@ -630,7 +633,8 @@
static const WCHAR query[] = {
'S','E','L','E','C','T',' ','`','M','e','s','s','a','g','e','`',' ',
'F','R','O','M',' ','`','E','r','r','o','r','`',' ',
- 'W','H','E','R','E',' ','`','E','r','r','o','r','`',' ','=',' ','%','s',0
+ 'W','H','E','R','E',' ','`','E','r','r','o','r','`',' ','=',' ',
+ '\'','%','s','\'',0
};
MSIQUERY *view = NULL;
MSIRECORD *row = 0;
@@ -685,7 +689,7 @@
prop = load_dynamic_property(package,source,&prc);
if (!prop)
- return prc;
+ return ERROR_SUCCESS;
deformat_string(package,target,&deformated);
len = strlenW(prop) + 2;
More information about the wine-patches
mailing list