msi: Set all folders' source paths to the root directory if the source type is compressed.
This commit is contained in:
parent
7538f9ac19
commit
ede4a3b598
|
@ -325,7 +325,9 @@ LPWSTR resolve_folder(MSIPACKAGE *package, LPCWSTR name, BOOL source,
|
|||
{
|
||||
path = NULL;
|
||||
|
||||
if (f->SourceLongPath)
|
||||
if (package->WordCount & msidbSumInfoSourceTypeCompressed)
|
||||
path = get_source_root( package );
|
||||
else
|
||||
path = build_directory_name( 3, p, f->SourceLongPath, NULL );
|
||||
|
||||
TRACE("source -> %s\n", debugstr_w(path));
|
||||
|
|
|
@ -5676,22 +5676,16 @@ static void test_MsiGetSourcePath(void)
|
|||
lstrcpyA(path, "kiwi");
|
||||
r = MsiGetSourcePath(hpkg, "SubDir", path, &size);
|
||||
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
||||
todo_wine
|
||||
{
|
||||
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
|
||||
ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
|
||||
}
|
||||
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
|
||||
ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
|
||||
|
||||
/* try SubDir2 after CostFinalize */
|
||||
size = MAX_PATH;
|
||||
lstrcpyA(path, "kiwi");
|
||||
r = MsiGetSourcePath(hpkg, "SubDir2", path, &size);
|
||||
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
||||
todo_wine
|
||||
{
|
||||
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
|
||||
ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
|
||||
}
|
||||
ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path);
|
||||
ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size);
|
||||
|
||||
MsiCloseHandle(hpkg);
|
||||
DeleteFile(msifile);
|
||||
|
|
Loading…
Reference in New Issue