msi: Cast-qual warning fix.

This commit is contained in:
Andrew Talbot 2007-07-23 18:53:19 +01:00 committed by Alexandre Julliard
parent 94e08ec5be
commit 0e14c29d66

View File

@ -630,22 +630,26 @@ UINT MSI_InstallPackage( MSIPACKAGE *package, LPCWSTR szPackagePath,
if (szPackagePath)
{
LPWSTR p, check, dir;
LPCWSTR file;
dir = strdupW(szPackagePath);
p = strrchrW(dir, '\\');
if (p)
{
*(++p) = 0;
file = szPackagePath + (p - dir);
}
else
{
msi_free(dir);
dir = msi_alloc(MAX_PATH*sizeof(WCHAR));
GetCurrentDirectoryW(MAX_PATH, dir);
lstrcatW(dir, cszbs);
p = (LPWSTR)szPackagePath;
file = szPackagePath;
}
msi_free( package->PackagePath );
package->PackagePath = msi_alloc((lstrlenW(dir) + lstrlenW(p) + 2) * sizeof(WCHAR));
package->PackagePath = msi_alloc((lstrlenW(dir) + lstrlenW(file) + 1) * sizeof(WCHAR));
if (!package->PackagePath)
{
msi_free(dir);
@ -653,8 +657,7 @@ UINT MSI_InstallPackage( MSIPACKAGE *package, LPCWSTR szPackagePath,
}
lstrcpyW(package->PackagePath, dir);
lstrcatW(package->PackagePath, cszbs);
lstrcatW(package->PackagePath, p);
lstrcatW(package->PackagePath, file);
check = msi_dup_property( package, cszSourceDir );
if (!check)