ole32: Don't ignore a failure to delete the old element in CreateStorage.

This commit is contained in:
Vincent Povirk 2009-05-29 16:54:06 -05:00 committed by Alexandre Julliard
parent e21adbf45a
commit 6f05770fbf
1 changed files with 5 additions and 1 deletions

View File

@ -1232,7 +1232,11 @@ static HRESULT WINAPI StorageImpl_CreateStorage(
*/
if (STGM_CREATE_MODE(grfMode) == STGM_CREATE &&
STGM_ACCESS_MODE(This->base.openFlags) != STGM_READ)
IStorage_DestroyElement(iface, pwcsName);
{
hr = IStorage_DestroyElement(iface, pwcsName);
if (FAILED(hr))
return hr;
}
else
{
WARN("file already exists\n");