Commit 0e14c29d authored by Andrew Talbot's avatar Andrew Talbot Committed by Alexandre Julliard

msi: Cast-qual warning fix.

parent 94e08ec5
...@@ -630,22 +630,26 @@ UINT MSI_InstallPackage( MSIPACKAGE *package, LPCWSTR szPackagePath, ...@@ -630,22 +630,26 @@ UINT MSI_InstallPackage( MSIPACKAGE *package, LPCWSTR szPackagePath,
if (szPackagePath) if (szPackagePath)
{ {
LPWSTR p, check, dir; LPWSTR p, check, dir;
LPCWSTR file;
dir = strdupW(szPackagePath); dir = strdupW(szPackagePath);
p = strrchrW(dir, '\\'); p = strrchrW(dir, '\\');
if (p) if (p)
{
*(++p) = 0; *(++p) = 0;
file = szPackagePath + (p - dir);
}
else else
{ {
msi_free(dir); msi_free(dir);
dir = msi_alloc(MAX_PATH*sizeof(WCHAR)); dir = msi_alloc(MAX_PATH*sizeof(WCHAR));
GetCurrentDirectoryW(MAX_PATH, dir); GetCurrentDirectoryW(MAX_PATH, dir);
lstrcatW(dir, cszbs); lstrcatW(dir, cszbs);
p = (LPWSTR)szPackagePath; file = szPackagePath;
} }
msi_free( package->PackagePath ); 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) if (!package->PackagePath)
{ {
msi_free(dir); msi_free(dir);
...@@ -653,8 +657,7 @@ UINT MSI_InstallPackage( MSIPACKAGE *package, LPCWSTR szPackagePath, ...@@ -653,8 +657,7 @@ UINT MSI_InstallPackage( MSIPACKAGE *package, LPCWSTR szPackagePath,
} }
lstrcpyW(package->PackagePath, dir); lstrcpyW(package->PackagePath, dir);
lstrcatW(package->PackagePath, cszbs); lstrcatW(package->PackagePath, file);
lstrcatW(package->PackagePath, p);
check = msi_dup_property( package, cszSourceDir ); check = msi_dup_property( package, cszSourceDir );
if (!check) if (!check)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment