ole32: Check the current storage for STGM_SIMPLE rather than ancestorStorage.

Since simple mode does not support substorages, we know these are the same.
This commit is contained in:
Vincent Povirk 2009-12-02 11:31:43 -06:00 committed by Alexandre Julliard
parent cf5e6c571a
commit b6dc718c44
2 changed files with 3 additions and 3 deletions

View File

@ -575,7 +575,7 @@ static HRESULT WINAPI StgStreamImpl_SetSize(
}
/* In simple mode keep the stream size above the small block limit */
if (This->parentStorage->ancestorStorage->base.openFlags & STGM_SIMPLE)
if (This->parentStorage->openFlags & STGM_SIMPLE)
libNewSize.u.LowPart = max(libNewSize.u.LowPart, LIMIT_TO_USE_SMALL_BLOCK);
if (This->streamSize.u.LowPart == libNewSize.u.LowPart)
@ -868,7 +868,7 @@ static HRESULT WINAPI StgStreamImpl_Stat(
pstatstg->grfMode = This->grfMode;
/* In simple create mode cbSize is the current pos */
if((root->base.openFlags & STGM_SIMPLE) && root->create)
if((This->parentStorage->openFlags & STGM_SIMPLE) && root->create)
pstatstg->cbSize = This->currentPosition;
return S_OK;

View File

@ -866,7 +866,7 @@ static HRESULT WINAPI StorageBaseImpl_CreateStream(
return STG_E_ACCESSDENIED;
}
if(This->ancestorStorage->base.openFlags & STGM_SIMPLE)
if(This->openFlags & STGM_SIMPLE)
if(grfMode & STGM_CREATE) return STG_E_INVALIDFLAG;
*ppstm = 0;