James Hawkins wrote:
Hi,
This fixes bug 5595. The Lotus Notes installer was calling MsiSetTargetPath after the CostFinalize action, which is where the target paths are originally set for installation files. Originally, the directories were being changed, but that doesn't trickle down to the file's target paths, so we have to update those too. After this change, all the Lotus Notes files install in the correct destination directory. Note that this affects other installers as well, but I don't remember the numbers off the top of my head.
Changelog:
- Update the files' target paths as well, because they may have
changed if a parent directory is changed.
dlls/msi/install.c | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-)
-- James Hawkins
diff --git a/dlls/msi/install.c b/dlls/msi/install.c index 5eaf10b..a09782d 100644 --- a/dlls/msi/install.c +++ b/dlls/msi/install.c @@ -331,6 +331,7 @@ UINT MSI_SetTargetPathW(MSIPACKAGE *pack LPWSTR path = NULL; LPWSTR path2 = NULL; MSIFOLDER *folder;
MSIFILE *file;
TRACE("(%p %s %s)\n",package, debugstr_w(szFolder),debugstr_w(szFolderPath));
@@ -374,6 +375,21 @@ UINT MSI_SetTargetPathW(MSIPACKAGE *pack path2 = resolve_folder(package, f->Directory, FALSE, TRUE, NULL); msi_free(path2); }
LIST_FOR_EACH_ENTRY( file, &package->files, MSIFILE, entry )
{
MSICOMPONENT *comp = file->Component;
LPWSTR p;
if (!comp)
continue;
p = resolve_folder(package, comp->Directory, FALSE, FALSE, NULL);
msi_free(file->TargetPath);
file->TargetPath = build_directory_name(2, p, file->FileName);
msi_free(p);
} msi_free(path);}
Hi James,
Funny, your patch looks just identical to mine (submitted but rejected by some reason) except for comments :)
<!-- beware of if () {} else if () {} else if () ... constructs --> By the way, does your patch fixes this issue for TARGETPATH? If yes, then the patch should remove some todo_wine in tests. If no, then do you plan to fix it in another patch? If no, then I will send patch to fix it myself later.