wininet: Store correct urlcache file size.

This commit is contained in:
Piotr Caban 2012-04-13 17:17:39 +02:00 committed by Alexandre Julliard
parent f9c9ea6343
commit fdf2e15b80
1 changed files with 3 additions and 2 deletions

View File

@ -420,6 +420,7 @@ static DWORD URLCacheContainer_OpenIndex(URLCACHECONTAINER * pContainer, DWORD b
{ {
dwError = GetLastError(); dwError = GetLastError();
} }
dwFileSize = new_file_size;
CloseHandle(hMapping); CloseHandle(hMapping);
} }
else else
@ -438,8 +439,8 @@ static DWORD URLCacheContainer_OpenIndex(URLCACHECONTAINER * pContainer, DWORD b
} }
pContainer->file_size = new_file_size; pContainer->file_size = dwFileSize;
wsprintfW(wszFilePath, wszMappingFormat, pContainer->path, wszIndex, new_file_size); wsprintfW(wszFilePath, wszMappingFormat, pContainer->path, wszIndex, dwFileSize);
URLCache_PathToObjectName(wszFilePath, '_'); URLCache_PathToObjectName(wszFilePath, '_');
pContainer->hMapping = OpenFileMappingW(FILE_MAP_WRITE, FALSE, wszFilePath); pContainer->hMapping = OpenFileMappingW(FILE_MAP_WRITE, FALSE, wszFilePath);
if (!pContainer->hMapping) if (!pContainer->hMapping)