Commit ede4a3b5 authored by James Hawkins's avatar James Hawkins Committed by Alexandre Julliard

msi: Set all folders' source paths to the root directory if the source type is compressed.

parent 7538f9ac
......@@ -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);
}
/* 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);
}
MsiCloseHandle(hpkg);
DeleteFile(msifile);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment