Commit a0397541 authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

wininet: Account for disk space usage when deleting url cache entries.

parent 7c15dc50
......@@ -2963,6 +2963,10 @@ BOOL WINAPI DeleteUrlCacheEntryA(LPCSTR lpszUrlName)
if (pHeader->directory_data[pUrlEntry->CacheDir].dwNumFiles)
pHeader->directory_data[pUrlEntry->CacheDir].dwNumFiles--;
}
if (pUrlEntry->size.QuadPart < pHeader->CacheUsage.QuadPart)
pHeader->CacheUsage.QuadPart -= pUrlEntry->size.QuadPart;
else
pHeader->CacheUsage.QuadPart = 0;
URLCache_DeleteEntry(pHeader, pEntry);
......@@ -3042,6 +3046,10 @@ BOOL WINAPI DeleteUrlCacheEntryW(LPCWSTR lpszUrlName)
if (pHeader->directory_data[pUrlEntry->CacheDir].dwNumFiles)
pHeader->directory_data[pUrlEntry->CacheDir].dwNumFiles--;
}
if (pUrlEntry->size.QuadPart < pHeader->CacheUsage.QuadPart)
pHeader->CacheUsage.QuadPart -= pUrlEntry->size.QuadPart;
else
pHeader->CacheUsage.QuadPart = 0;
URLCache_DeleteEntry(pHeader, pEntry);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment