Commit 9189bf3d authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

wininet: Don't call URL_LocalFileNameToPathA when asked for a unicode string and…

wininet: Don't call URL_LocalFileNameToPathA when asked for a unicode string and URL_LocalFileNameToPathW fails.
parent 024c13c1
......@@ -1005,7 +1005,7 @@ static DWORD URLCache_CopyEntry(
lpszLocalFileName = (LPSTR)lpCacheEntryInfo + dwRequiredSize;
nLocalFilePathSize = *lpdwBufferSize - dwRequiredSize;
if ((bUnicode && URLCache_LocalFileNameToPathW(pContainer, pHeader, (LPCSTR)pUrlEntry + pUrlEntry->dwOffsetLocalName, pUrlEntry->CacheDir, (LPWSTR)lpszLocalFileName, &nLocalFilePathSize)) ||
URLCache_LocalFileNameToPathA(pContainer, pHeader, (LPCSTR)pUrlEntry + pUrlEntry->dwOffsetLocalName, pUrlEntry->CacheDir, lpszLocalFileName, &nLocalFilePathSize))
(!bUnicode && URLCache_LocalFileNameToPathA(pContainer, pHeader, (LPCSTR)pUrlEntry + pUrlEntry->dwOffsetLocalName, pUrlEntry->CacheDir, lpszLocalFileName, &nLocalFilePathSize)))
{
lpCacheEntryInfo->lpszLocalFileName = lpszLocalFileName;
}
......
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