Vincent Povirk : ole32: Warn in cases where we might corrupt storage files.
Alexandre Julliard
julliard at winehq.org
Fri May 9 13:32:35 CDT 2014
Module: wine
Branch: master
Commit: 45dd716e4e3115fb41675302d452953d30a32481
URL: http://source.winehq.org/git/wine.git/?a=commit;h=45dd716e4e3115fb41675302d452953d30a32481
Author: Vincent Povirk <vincent at 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);
More information about the wine-cvs
mailing list