mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 17:42:58 +00:00
[WINESYNC] msi: Allow recursive changes to the target folder path.
Signed-off-by: Hans Leidekker <hans@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org> wine commit id 7bf2a1b2099b534fd4472962d2e945bc9ab9e2b8 by Hans Leidekker <hans@codeweavers.com>
This commit is contained in:
parent
a49306360d
commit
bc149d9d14
2 changed files with 11 additions and 23 deletions
|
@ -2401,15 +2401,11 @@ void msi_resolve_target_folder( MSIPACKAGE *package, const WCHAR *name, BOOL loa
|
||||||
else
|
else
|
||||||
path = msi_build_directory_name( 2, folder->TargetDefault, NULL );
|
path = msi_build_directory_name( 2, folder->TargetDefault, NULL );
|
||||||
}
|
}
|
||||||
|
|
||||||
normalized_path = msi_normalize_path( path );
|
normalized_path = msi_normalize_path( path );
|
||||||
msi_free( path );
|
|
||||||
if (folder->ResolvedTarget && !strcmpiW( normalized_path, folder->ResolvedTarget ))
|
|
||||||
{
|
|
||||||
TRACE("%s already resolved to %s\n", debugstr_w(name), debugstr_w(folder->ResolvedTarget));
|
|
||||||
msi_free( normalized_path );
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
msi_set_property( package->db, folder->Directory, normalized_path, -1 );
|
msi_set_property( package->db, folder->Directory, normalized_path, -1 );
|
||||||
|
msi_free( path );
|
||||||
|
|
||||||
msi_free( folder->ResolvedTarget );
|
msi_free( folder->ResolvedTarget );
|
||||||
folder->ResolvedTarget = normalized_path;
|
folder->ResolvedTarget = normalized_path;
|
||||||
|
|
||||||
|
|
|
@ -336,16 +336,18 @@ static const char spf_custom_action_dat[] =
|
||||||
"Action\tType\tSource\tTarget\tISComments\n"
|
"Action\tType\tSource\tTarget\tISComments\n"
|
||||||
"s72\ti2\tS64\tS0\tS255\n"
|
"s72\ti2\tS64\tS0\tS255\n"
|
||||||
"CustomAction\tAction\n"
|
"CustomAction\tAction\n"
|
||||||
"SetFolderProp\t51\tMSITESTDIR\t[ProgramFilesFolder]\\msitest\\added\t\n";
|
"SetFolderProp\t51\tMSITESTDIR\t[ProgramFilesFolder]\\msitest\\added\t\n"
|
||||||
|
"SetFolderProp2\t51\tMSITESTDIR\t[ProgramFilesFolder]\\msitest\\added\\added2\t\n";
|
||||||
|
|
||||||
static const char spf_install_exec_seq_dat[] =
|
static const char spf_install_exec_seq_dat[] =
|
||||||
"Action\tCondition\tSequence\n"
|
"Action\tCondition\tSequence\n"
|
||||||
"s72\tS255\tI2\n"
|
"s72\tS255\tI2\n"
|
||||||
"InstallExecuteSequence\tAction\n"
|
"InstallExecuteSequence\tAction\n"
|
||||||
"CostFinalize\t\t1000\n"
|
|
||||||
"CostInitialize\t\t800\n"
|
"CostInitialize\t\t800\n"
|
||||||
"FileCost\t\t900\n"
|
"FileCost\t\t900\n"
|
||||||
"SetFolderProp\t\t950\n"
|
"SetFolderProp\t\t950\n"
|
||||||
|
"SetFolderProp2\t\t960\n"
|
||||||
|
"CostFinalize\t\t1000\n"
|
||||||
"InstallFiles\t\t4000\n"
|
"InstallFiles\t\t4000\n"
|
||||||
"InstallServices\t\t5000\n"
|
"InstallServices\t\t5000\n"
|
||||||
"InstallFinalize\t\t6600\n"
|
"InstallFinalize\t\t6600\n"
|
||||||
|
@ -14103,7 +14105,6 @@ static void test_setpropertyfolder(void)
|
||||||
{
|
{
|
||||||
UINT r;
|
UINT r;
|
||||||
CHAR path[MAX_PATH];
|
CHAR path[MAX_PATH];
|
||||||
DWORD attr;
|
|
||||||
|
|
||||||
if (is_process_limited())
|
if (is_process_limited())
|
||||||
{
|
{
|
||||||
|
@ -14128,19 +14129,10 @@ static void test_setpropertyfolder(void)
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
|
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
|
||||||
attr = GetFileAttributesA(path);
|
ok(delete_pf("msitest\\added\\added2\\maximus", TRUE), "File not installed\n");
|
||||||
if (attr != INVALID_FILE_ATTRIBUTES && (attr & FILE_ATTRIBUTE_DIRECTORY))
|
ok(delete_pf("msitest\\added\\added2", FALSE), "Directory not created\n");
|
||||||
{
|
ok(delete_pf("msitest\\added", FALSE), "Directory not created\n");
|
||||||
ok(delete_pf("msitest\\added\\maximus", TRUE), "File not installed\n");
|
ok(delete_pf("msitest", FALSE), "Directory not created\n");
|
||||||
ok(delete_pf("msitest\\added", FALSE), "Directory not created\n");
|
|
||||||
ok(delete_pf("msitest", FALSE), "Directory not created\n");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
trace("changing folder property not supported\n");
|
|
||||||
ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n");
|
|
||||||
ok(delete_pf("msitest", FALSE), "Directory not created\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
error:
|
error:
|
||||||
DeleteFileA(msifile);
|
DeleteFileA(msifile);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue