Commit e89f8496 authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

Fix situations where TARGETDIR is set to a non \ terminated

path. Fixes a few installers.
parent 92ef78ee
......@@ -270,13 +270,20 @@ LPWSTR resolve_folder(MSIPACKAGE *package, LPCWSTR name, BOOL source,
{
if (!source)
{
path = load_dynamic_property(package,cszTargetDir,NULL);
if (!path)
LPWSTR check_path;
check_path = load_dynamic_property(package,cszTargetDir,NULL);
if (!check_path)
{
path = load_dynamic_property(package,cszRootDrive,NULL);
check_path = load_dynamic_property(package,cszRootDrive,NULL);
if (set_prop)
MSI_SetPropertyW(package,cszTargetDir,path);
MSI_SetPropertyW(package,cszTargetDir,check_path);
}
/* correct misbuilt target dir */
path = build_directory_name(2, check_path, NULL);
if (strcmpiW(path,check_path)!=0)
MSI_SetPropertyW(package,cszTargetDir,path);
if (folder)
{
for (i = 0; i < package->loaded_folders; i++)
......
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