Fix situations where TARGETDIR is set to a non \ terminated

path. Fixes a few installers.
This commit is contained in:
Aric Stewart 2005-06-21 20:21:30 +00:00 committed by Alexandre Julliard
parent 92ef78ee04
commit e89f849612
1 changed files with 11 additions and 4 deletions

View File

@ -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++)