wininet: Don't delete the cache file when closing a request.

This commit is contained in:
Hans Leidekker 2009-06-23 09:36:07 +02:00 committed by Alexandre Julliard
parent 3a43866790
commit aa05f97fc9
2 changed files with 2 additions and 5 deletions

View File

@ -1492,10 +1492,7 @@ static void HTTPREQ_Destroy(WININETHANDLEHEADER *hdr)
if(lpwhr->hCacheFile)
CloseHandle(lpwhr->hCacheFile);
if(lpwhr->lpszCacheFile) {
DeleteFileW(lpwhr->lpszCacheFile); /* FIXME */
HeapFree(GetProcessHeap(), 0, lpwhr->lpszCacheFile);
}
HeapFree(GetProcessHeap(), 0, lpwhr->lpszCacheFile);
DeleteCriticalSection( &lpwhr->read_section );
WININET_Release(&lpwhr->lpHttpSession->hdr);

View File

@ -1146,7 +1146,7 @@ static void test_http_cache(void)
file = CreateFile(file_name, GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL, NULL);
todo_wine ok(file != INVALID_HANDLE_VALUE, "Could not create file: %u\n", GetLastError());
ok(file != INVALID_HANDLE_VALUE, "Could not create file: %u\n", GetLastError());
CloseHandle(file);
request = HttpOpenRequestA(connect, NULL, "/", NULL, NULL, types, INTERNET_FLAG_NO_CACHE_WRITE, 0);