[PATCH] MSI:ACTION_AppSearchReg() should return backslash terminated paths
Massimo Del Fedele
max at veneto.com
Thu Jul 3 17:12:35 CDT 2008
---
dlls/msi/appsearch.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/dlls/msi/appsearch.c b/dlls/msi/appsearch.c
index 0743aee..79cb6fe 100644
--- a/dlls/msi/appsearch.c
+++ b/dlls/msi/appsearch.c
@@ -368,6 +368,17 @@ static UINT ACTION_AppSearchReg(MSIPACKAGE *package, LPWSTR *appValue, MSISIGNAT
switch (type & 0x0f)
{
case msidbLocatorTypeDirectory:
+ /* directories should be returned with a trailing backslash
+ so check for it and append if necessary */
+ if((LPWSTR)value[sz-1] != L'\\')
+ {
+ *appValue = (LPWSTR)value;
+ value = msi_alloc(sz+1);
+ lstrcpyW((LPWSTR)value, *appValue);
+ lstrcatW(value, L"\\");
+ msi_free(*appValue);
+ *appValue = NULL;
+ }
rc = ACTION_SearchDirectory(package, sig, (LPWSTR)value, 0, appValue);
break;
case msidbLocatorTypeFileName:
--
1.5.4.3
--------------050709070808070806080801--
More information about the wine-patches
mailing list