From 672952d2b6abf525d3ccd73b68ee418f51f8eae2 Mon Sep 17 00:00:00 2001 From: James Hawkins Date: Wed, 28 Mar 2007 01:56:39 -0500 Subject: [PATCH] setupapi: Correct the Inf output position. --- dlls/setupapi/misc.c | 2 +- dlls/setupapi/tests/misc.c | 17 ++++------------- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/dlls/setupapi/misc.c b/dlls/setupapi/misc.c index eb3c3a19177..4c7786fbdae 100644 --- a/dlls/setupapi/misc.c +++ b/dlls/setupapi/misc.c @@ -978,7 +978,7 @@ BOOL WINAPI SetupCopyOEMInfW( PCWSTR source, PCWSTR location, } } - if (component) *component = p; + if (component) *component = p + 1; if (required_size) *required_size = size; return ret; diff --git a/dlls/setupapi/tests/misc.c b/dlls/setupapi/tests/misc.c index 27dcc777e93..d5668163b3f 100644 --- a/dlls/setupapi/tests/misc.c +++ b/dlls/setupapi/tests/misc.c @@ -92,7 +92,7 @@ static BOOL check_format(LPSTR path, LPSTR inf) GetWindowsDirectory(check, MAX_PATH); lstrcat(check, format); - res = !strncmp(check, path, lstrlen(check)) && + res = !strncasecmp(check, path, lstrlen(check)) && path[lstrlen(check)] != '\\'; return (!inf) ? res : res && (inf == path + lstrlen(check) - 3); @@ -196,10 +196,7 @@ static void test_SetupCopyOEMInf(void) ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError()); ok(lstrlen(dest) != 0, "Expected a non-zero length string\n"); ok(file_exists(dest), "Expected destination inf to exist\n"); - todo_wine - { - ok(check_format(dest, NULL), "Expected %%windir%%\\inf\\OEMx.inf, got %s\n", dest); - } + ok(check_format(dest, NULL), "Expected %%windir%%\\inf\\OEMx.inf, got %s\n", dest); ok(file_exists(path), "Expected source inf to exist\n"); lstrcpy(dest_save, dest); @@ -227,10 +224,7 @@ static void test_SetupCopyOEMInf(void) ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError()); ok(lstrlen(dest) + 1 == size, "Expected sizes to match, got (%d, %d)\n", lstrlen(dest), size); ok(file_exists(dest), "Expected destination inf to exist\n"); - todo_wine - { - ok(check_format(dest, NULL), "Expected %%windir%%\\inf\\OEMx.inf, got %s\n", dest); - } + ok(check_format(dest, NULL), "Expected %%windir%%\\inf\\OEMx.inf, got %s\n", dest); ok(file_exists(path), "Expected source inf to exist\n"); ok(size == lstrlen(dest_save) + 1, "Expected size to be lstrlen(dest_save) + 1\n"); @@ -241,10 +235,7 @@ static void test_SetupCopyOEMInf(void) ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError()); ok(lstrlen(dest) + 1 == size, "Expected sizes to match, got (%d, %d)\n", lstrlen(dest), size); ok(file_exists(dest), "Expected destination inf to exist\n"); - todo_wine - { - ok(check_format(dest, inf), "Expected %%windir%%\\inf\\OEMx.inf, got %s\n", dest); - } + ok(check_format(dest, inf), "Expected %%windir%%\\inf\\OEMx.inf, got %s\n", dest); ok(file_exists(path), "Expected source inf to exist\n"); ok(size == lstrlen(dest_save) + 1, "Expected size to be lstrlen(dest_save) + 1\n");