Module: wine Branch: master Commit: 45dd716e4e3115fb41675302d452953d30a32481 URL: http://source.winehq.org/git/wine.git/?a=commit;h=45dd716e4e3115fb41675302d4...
Author: Vincent Povirk vincent@codeweavers.com Date: Thu May 8 13:34:38 2014 -0500
ole32: Warn in cases where we might corrupt storage files.
---
dlls/ole32/storage32.c | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c index 7f1affb..a71ec41 100644 --- a/dlls/ole32/storage32.c +++ b/dlls/ole32/storage32.c @@ -4992,6 +4992,8 @@ static HRESULT WINAPI TransactedSnapshotImpl_Commit( { if ((grfCommitFlags & STGC_ONLYIFCURRENT) && transactionSig != This->lastTransactionSig) hr = STG_E_NOTCURRENT; + else if (transactionSig != This->lastTransactionSig) + ERR("proceeding with unsafe commit\n");
if (SUCCEEDED(hr)) { @@ -5546,6 +5548,12 @@ static HRESULT Storage_Construct(
if (openFlags & STGM_TRANSACTED) { + static int fixme; + + if (STGM_SHARE_MODE(openFlags) != STGM_SHARE_DENY_WRITE && + STGM_SHARE_MODE(openFlags) != STGM_SHARE_EXCLUSIVE && !fixme++) + FIXME("transacted storage write sharing not implemented safely\n"); + hr = Storage_ConstructTransacted(&newStorage->base, &newTransactedStorage); if (FAILED(hr)) IStorage_Release(&newStorage->base.IStorage_iface);