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

Hans Leidekker hans at codeweavers.com
Tue Jun 23 02:36:07 CDT 2009


diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c
index e1a7ddc..6b3fb9a 100644
--- a/dlls/wininet/http.c
+++ b/dlls/wininet/http.c
@@ -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);
diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c
index ba72629..f7994c5 100644
--- a/dlls/wininet/tests/http.c
+++ b/dlls/wininet/tests/http.c
@@ -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);



More information about the wine-patches mailing list