From 5624128959d5516f2195cebd60d9901d19b67b74 Mon Sep 17 00:00:00 2001 From: Paul Vriens Date: Sun, 12 Dec 2010 13:14:05 +0100 Subject: [PATCH] shdocvw/tests: Make sure we use a valid temporary directory. --- dlls/shdocvw/tests/intshcut.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dlls/shdocvw/tests/intshcut.c b/dlls/shdocvw/tests/intshcut.c index dbfb4d65e93..c0466011fac 100644 --- a/dlls/shdocvw/tests/intshcut.c +++ b/dlls/shdocvw/tests/intshcut.c @@ -178,7 +178,8 @@ static void test_ReadAndWriteProperties(void) HRESULT hr; IUniformResourceLocatorA *urlA; IUniformResourceLocatorA *urlAFromFile; - WCHAR fileNameW[] = {'C',':','/','w','i','n','d','o','w','s','/','t','e','m','p','/','t','e','s','t','s','h','o','r','t','c','u','t','.','u','r','l',0}; + WCHAR fileNameW[MAX_PATH]; + static const WCHAR shortcutW[] = {'t','e','s','t','s','h','o','r','t','c','u','t','.','u','r','l',0}; WCHAR iconPath[] = {'f','i','l','e',':','/','/','/','C',':','/','a','r','b','i','t','r','a','r','y','/','i','c','o','n','/','p','a','t','h',0}; int iconIndex = 7; char testurl[] = "http://some/bogus/url.html"; @@ -188,6 +189,10 @@ static void test_ReadAndWriteProperties(void) ps[1].ulKind = PRSPEC_PROPID; ps[1].propid = PID_IS_ICONINDEX; + /* Make sure we have a valid temporary directory */ + GetTempPathW(MAX_PATH, fileNameW); + lstrcatW(fileNameW, shortcutW); + hr = CoCreateInstance(&CLSID_InternetShortcut, NULL, CLSCTX_ALL, &IID_IUniformResourceLocatorA, (void**)&urlA); if (hr == S_OK) {