Commit 396eea60 authored by James Hawkins's avatar James Hawkins Committed by Alexandre Julliard

msi: Determine the source path based on the short/long file names bit of the…

msi: Determine the source path based on the short/long file names bit of the Word Count summary property.
parent ede4a3b5
...@@ -327,6 +327,8 @@ LPWSTR resolve_folder(MSIPACKAGE *package, LPCWSTR name, BOOL source, ...@@ -327,6 +327,8 @@ LPWSTR resolve_folder(MSIPACKAGE *package, LPCWSTR name, BOOL source,
if (package->WordCount & msidbSumInfoSourceTypeCompressed) if (package->WordCount & msidbSumInfoSourceTypeCompressed)
path = get_source_root( package ); path = get_source_root( package );
else if (package->WordCount & msidbSumInfoSourceTypeSFN)
path = build_directory_name( 3, p, f->SourceShortPath, NULL );
else else
path = build_directory_name( 3, p, f->SourceLongPath, NULL ); path = build_directory_name( 3, p, f->SourceLongPath, NULL );
......
...@@ -5918,11 +5918,8 @@ static void test_shortlongsource(void) ...@@ -5918,11 +5918,8 @@ static void test_shortlongsource(void)
lstrcpyA(path, "kiwi"); lstrcpyA(path, "kiwi");
r = MsiGetSourcePath(hpkg, "SubDir", path, &size); r = MsiGetSourcePath(hpkg, "SubDir", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
todo_wine ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path);
{ ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size);
ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path);
ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size);
}
CreateDirectoryA("short", NULL); CreateDirectoryA("short", NULL);
...@@ -5931,11 +5928,8 @@ static void test_shortlongsource(void) ...@@ -5931,11 +5928,8 @@ static void test_shortlongsource(void)
lstrcpyA(path, "kiwi"); lstrcpyA(path, "kiwi");
r = MsiGetSourcePath(hpkg, "SubDir", path, &size); r = MsiGetSourcePath(hpkg, "SubDir", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
todo_wine ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path);
{ ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size);
ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path);
ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size);
}
CreateDirectoryA("long", NULL); CreateDirectoryA("long", NULL);
...@@ -5944,11 +5938,8 @@ static void test_shortlongsource(void) ...@@ -5944,11 +5938,8 @@ static void test_shortlongsource(void)
lstrcpyA(path, "kiwi"); lstrcpyA(path, "kiwi");
r = MsiGetSourcePath(hpkg, "SubDir", path, &size); r = MsiGetSourcePath(hpkg, "SubDir", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
todo_wine ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path);
{ ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size);
ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path);
ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size);
}
lstrcpyA(subsrc, cwd); lstrcpyA(subsrc, cwd);
lstrcatA(subsrc, "one"); lstrcatA(subsrc, "one");
...@@ -5959,7 +5950,7 @@ static void test_shortlongsource(void) ...@@ -5959,7 +5950,7 @@ static void test_shortlongsource(void)
lstrcpyA(path, "kiwi"); lstrcpyA(path, "kiwi");
r = MsiGetSourcePath(hpkg, "SubDir2", path, &size); r = MsiGetSourcePath(hpkg, "SubDir2", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
todo_wine ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path); ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path);
ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size); ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size);
lstrcpyA(subsrc, cwd); lstrcpyA(subsrc, cwd);
...@@ -5971,11 +5962,8 @@ static void test_shortlongsource(void) ...@@ -5971,11 +5962,8 @@ static void test_shortlongsource(void)
lstrcpyA(path, "kiwi"); lstrcpyA(path, "kiwi");
r = MsiGetSourcePath(hpkg, "SubDir3", path, &size); r = MsiGetSourcePath(hpkg, "SubDir3", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
todo_wine ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path);
{ ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size);
ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path);
ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size);
}
lstrcpyA(subsrc, cwd); lstrcpyA(subsrc, cwd);
lstrcatA(subsrc, "five"); lstrcatA(subsrc, "five");
...@@ -5986,11 +5974,8 @@ static void test_shortlongsource(void) ...@@ -5986,11 +5974,8 @@ static void test_shortlongsource(void)
lstrcpyA(path, "kiwi"); lstrcpyA(path, "kiwi");
r = MsiGetSourcePath(hpkg, "SubDir4", path, &size); r = MsiGetSourcePath(hpkg, "SubDir4", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
todo_wine ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path);
{ ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size);
ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path);
ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size);
}
lstrcpyA(subsrc, cwd); lstrcpyA(subsrc, cwd);
lstrcatA(subsrc, "seven"); lstrcatA(subsrc, "seven");
...@@ -6001,7 +5986,7 @@ static void test_shortlongsource(void) ...@@ -6001,7 +5986,7 @@ static void test_shortlongsource(void)
lstrcpyA(path, "kiwi"); lstrcpyA(path, "kiwi");
r = MsiGetSourcePath(hpkg, "SubDir5", path, &size); r = MsiGetSourcePath(hpkg, "SubDir5", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
todo_wine ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path); ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path);
ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size); ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size);
lstrcpyA(subsrc, cwd); lstrcpyA(subsrc, cwd);
...@@ -6013,11 +5998,8 @@ static void test_shortlongsource(void) ...@@ -6013,11 +5998,8 @@ static void test_shortlongsource(void)
lstrcpyA(path, "kiwi"); lstrcpyA(path, "kiwi");
r = MsiGetSourcePath(hpkg, "SubDir6", path, &size); r = MsiGetSourcePath(hpkg, "SubDir6", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
todo_wine ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path);
{ ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size);
ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path);
ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size);
}
lstrcpyA(subsrc, cwd); lstrcpyA(subsrc, cwd);
lstrcatA(subsrc, "eleven"); lstrcatA(subsrc, "eleven");
...@@ -6028,7 +6010,7 @@ static void test_shortlongsource(void) ...@@ -6028,7 +6010,7 @@ static void test_shortlongsource(void)
lstrcpyA(path, "kiwi"); lstrcpyA(path, "kiwi");
r = MsiGetSourcePath(hpkg, "SubDir7", path, &size); r = MsiGetSourcePath(hpkg, "SubDir7", path, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
todo_wine ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path); ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path);
ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size); ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size);
MsiCloseHandle(hpkg); MsiCloseHandle(hpkg);
......
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