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.
On 7/4/06, Andrey Turkin pancha@mail.nnov.ru wrote:
Hi James,
Funny, your patch looks just identical to mine (submitted but rejected by some reason) except for comments :)
hmm I haven't seen your patch. If the code is similar, it's probably because we both copied and pasted from ACTION_CostFinalize.
<!-- 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.
I'm not sure what you're asking, if it fixes the issue for TARGETPATH. I'm guessing you mean TARGETDIR. The second part of your patch should be sent separately, in any case, becuase there are two fixes. As the note for my patch said, this behavior is expected by several installers, specifically the Lotus Notes installer, which works after the patch.
James Hawkins wrote:
On 7/4/06, Andrey Turkin pancha@mail.nnov.ru wrote:
Hi James,
Funny, your patch looks just identical to mine (submitted but rejected by some reason) except for comments :)
hmm I haven't seen your patch. If the code is similar, it's probably because we both copied and pasted from ACTION_CostFinalize.
Yeah, you and me found have done identical job here. I've been too busy to send this fix again :(
<!-- 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.
I'm not sure what you're asking, if it fixes the issue for TARGETPATH. I'm guessing you mean TARGETDIR. The second part of your patch
You right, I've meant TARGETDIR. I've submitted test for this bug in case of TARGETDIR; that's why I asked you about it.
should be sent separately, in any case, becuase there are two fixes.
Yes, I guess that's why my patch was rejected.
As the note for my patch said, this behavior is expected by several installers, specifically the Lotus Notes installer, which works after the patch.
Ok, so I'll resubmit fix for TARGETDIR later.