Module: wine Branch: master Commit: ede4a3b598c12d971b66a3dc8e68ec2afe875fe0 URL: http://source.winehq.org/git/wine.git/?a=commit;h=ede4a3b598c12d971b66a3dc8e...
Author: James Hawkins jhawkins@codeweavers.com Date: Tue Jul 22 00:55:26 2008 -0500
msi: Set all folders' source paths to the root directory if the source type is compressed.
---
dlls/msi/helpers.c | 4 +++- dlls/msi/tests/package.c | 14 ++++---------- 2 files changed, 7 insertions(+), 11 deletions(-)
diff --git a/dlls/msi/helpers.c b/dlls/msi/helpers.c index c578c68..620a8da 100644 --- a/dlls/msi/helpers.c +++ b/dlls/msi/helpers.c @@ -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)); diff --git a/dlls/msi/tests/package.c b/dlls/msi/tests/package.c index 8e011c8..78c7675 100644 --- a/dlls/msi/tests/package.c +++ b/dlls/msi/tests/package.c @@ -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);