From 6296de389adfffc23a226583bdd79668a9f24c3c Mon Sep 17 00:00:00 2001 From: Aric Stewart Date: Mon, 3 Jan 2005 16:06:44 +0000 Subject: [PATCH] Be sure that set paths are terminated with a backslash. --- dlls/msi/action.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index b51bd199e22..5d7c107da97 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -5055,6 +5055,7 @@ UINT MSI_SetTargetPathW(MSIPACKAGE *package, LPCWSTR szFolder, { DWORD i; LPWSTR path = NULL; + INT len; MSIFOLDER *folder; TRACE("(%p %s %s)\n",package, debugstr_w(szFolder),debugstr_w(szFolderPath)); @@ -5073,7 +5074,17 @@ UINT MSI_SetTargetPathW(MSIPACKAGE *package, LPCWSTR szFolder, return ERROR_INVALID_PARAMETER; HeapFree(GetProcessHeap(),0,path); - strcpyW(folder->Property,szFolderPath); + len = strlenW(szFolderPath); + + if (szFolderPath[len-1]!='\\') + { + len +=2; + folder->Property = HeapAlloc(GetProcessHeap(),0,len*sizeof(WCHAR)); + strcpyW(folder->Property,szFolderPath); + strcatW(folder->Property,cszbs); + } + else + folder->Property = dupstrW(szFolderPath); for (i = 0; i < package->loaded_folders; i++) package->folders[i].ResolvedTarget=NULL; -- 2.11.4.GIT