Return STG_E_FILEALREADYEXISTS in ole32.StgOpenStorage if the file is

not a storage object.
This commit is contained in:
Dmitry Timoshkov 2001-04-16 18:57:18 +00:00 committed by Alexandre Julliard
parent 270bc587d8
commit 973355f617
1 changed files with 5 additions and 0 deletions

View File

@ -5485,6 +5485,11 @@ HRESULT WINAPI StgOpenStorage(
if (FAILED(hr))
{
HeapFree(GetProcessHeap(), 0, newStorage);
/*
* According to the docs if the file is not a storage, return STG_E_FILEALREADYEXISTS
*/
if(hr == STG_E_INVALIDHEADER)
return STG_E_FILEALREADYEXISTS;
return hr;
}