MSI: be sure that set paths are terminated with a bash

Mike McCormack mike at codeweavers.com
Tue Dec 28 00:53:42 CST 2004


ChangeLog:
<aric at codeweavers.com>
* be sure that set paths are terminated with a bash
-------------- next part --------------
--- dlls/msi/action.c.old	2004-12-28 15:48:12.000000000 +0900
+++ dlls/msi/action.c	2004-12-28 15:52:13.000000000 +0900
@@ -5067,6 +5067,7 @@
 {
     DWORD i;
     LPWSTR path = NULL;
+    INT len;
     MSIFOLDER *folder;
 
     TRACE("(%p %s %s)\n",package, debugstr_w(szFolder),debugstr_w(szFolderPath));
@@ -5085,7 +5086,17 @@
         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;


More information about the wine-patches mailing list