Module: wine Branch: master Commit: e098f427b4b33e1591c9c796fd44dd3650becac3 URL: http://source.winehq.org/git/wine.git/?a=commit;h=e098f427b4b33e1591c9c796fd...
Author: Alexandre Julliard julliard@winehq.org Date: Mon Jan 19 15:45:33 2009 +0100
wintrust/tests: Clean up temp files after test.
---
dlls/wintrust/tests/crypt.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/dlls/wintrust/tests/crypt.c b/dlls/wintrust/tests/crypt.c index 624f2c4..c2339a5 100644 --- a/dlls/wintrust/tests/crypt.c +++ b/dlls/wintrust/tests/crypt.c @@ -605,15 +605,17 @@ static void test_catalog_properties(CHAR *catfile, int attributes, int members)
attributes = 2; members = 1; + MultiByteToWideChar(CP_ACP, 0, catalog, -1, catalogW, MAX_PATH); } else - strcpy(catalog, catfile); + { + MultiByteToWideChar(CP_ACP, 0, catfile, -1, catalogW, MAX_PATH); + catalog[0] = 0; + }
hcat = pCryptCATOpen(NULL, 0, 0, 0, 0); ok(hcat == INVALID_HANDLE_VALUE, "CryptCATOpen succeeded\n");
- MultiByteToWideChar(CP_ACP, 0, catalog, -1, catalogW, MAX_PATH); - hcat = pCryptCATOpen(catalogW, 0, 0, 0, 0); ok(hcat != INVALID_HANDLE_VALUE, "CryptCATOpen failed %u\n", GetLastError());
@@ -658,6 +660,7 @@ static void test_catalog_properties(CHAR *catfile, int attributes, int members)
ret = pCryptCATClose(hcat); ok(ret, "CryptCATClose failed\n"); + if (catalog[0]) DeleteFileA( catalog ); }
static void test_create_catalog_file(void)