From: Zebediah Figura zfigura@codeweavers.com
--- dlls/setupapi/query.c | 8 +------- dlls/setupapi/tests/query.c | 14 +++++++------- 2 files changed, 8 insertions(+), 14 deletions(-)
diff --git a/dlls/setupapi/query.c b/dlls/setupapi/query.c index c94fec77124..40ec30ae11f 100644 --- a/dlls/setupapi/query.c +++ b/dlls/setupapi/query.c @@ -390,12 +390,6 @@ static LPWSTR get_source_id( HINF hinf, PINFCONTEXT context, PCWSTR filename ) return NULL; }
- if (!SetupFindFirstLineW( hinf, source_disks_names_platform, source_id, context ) && - !SetupFindFirstLineW( hinf, source_disks_names, source_id, context )) - { - free( source_id ); - return NULL; - } return source_id; }
@@ -444,7 +438,7 @@ BOOL WINAPI SetupGetSourceFileLocationW( HINF hinf, PINFCONTEXT context, PCWSTR } free( source_id_str );
- if (SetupGetStringFieldW( &ctx, 4, buffer, buffer_size, required_size )) + if (SetupGetStringFieldW( &ctx, 2, buffer, buffer_size, required_size )) return TRUE;
if (required_size) *required_size = 1; diff --git a/dlls/setupapi/tests/query.c b/dlls/setupapi/tests/query.c index 8f4400b802e..d5de41b368a 100644 --- a/dlls/setupapi/tests/query.c +++ b/dlls/setupapi/tests/query.c @@ -349,7 +349,7 @@ static void test_SetupGetSourceFileLocation(void) ret = SetupGetSourceFileLocationA(hinf, NULL, "two.txt", &source_id, buffer, sizeof(buffer), NULL); ok(ret, "Got error %lu.\n", GetLastError()); ok(source_id == 4, "Got source id %u.\n", source_id); - todo_wine ok(!strcmp(buffer, "there"), "Got relative path %s.\n", debugstr_a(buffer)); + ok(!strcmp(buffer, "there"), "Got relative path %s.\n", debugstr_a(buffer));
ret = SetupFindFirstLineA(hinf, "copy_section", NULL, &ctx); ok(ret, "Got error %lu.\n", GetLastError()); @@ -381,14 +381,14 @@ static void test_SetupGetSourceFileLocation(void) ok(ret, "Got error %lu.\n", GetLastError());
ret = SetupGetSourceFileLocationA(hinf, &ctx, "two.txt", &source_id, buffer, sizeof(buffer), NULL); - todo_wine ok(ret, "Got error %lu.\n", GetLastError()); - todo_wine ok(source_id == 10, "Got source id %u.\n", source_id); - todo_wine ok(!strcmp(buffer, ""), "Got relative path %s.\n", debugstr_a(buffer)); + ok(ret, "Got error %lu.\n", GetLastError()); + ok(source_id == 10, "Got source id %u.\n", source_id); + ok(!strcmp(buffer, ""), "Got relative path %s.\n", debugstr_a(buffer));
ret = SetupGetSourceFileLocationA(hinf, NULL, "three.txt", &source_id, buffer, sizeof(buffer), NULL); - todo_wine ok(ret, "Got error %lu.\n", GetLastError()); - todo_wine ok(source_id == 6, "Got source id %u.\n", source_id); - todo_wine ok(!strcmp(buffer, ""), "Got relative path %s.\n", debugstr_a(buffer)); + ok(ret, "Got error %lu.\n", GetLastError()); + ok(source_id == 6, "Got source id %u.\n", source_id); + ok(!strcmp(buffer, ""), "Got relative path %s.\n", debugstr_a(buffer));
SetLastError(0xdeadbeef); ret = SetupGetSourceFileLocationA(hinf, NULL, "four.txt", &source_id, buffer, sizeof(buffer), NULL);