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

Alexandre Julliard julliard at winehq.org
Mon Jun 1 10:01:01 CDT 2009


Module: wine
Branch: master
Commit: 6f05770fbf4fb47937b5266b3820cca99141ebd9
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=6f05770fbf4fb47937b5266b3820cca99141ebd9

Author: Vincent Povirk <vincent at codeweavers.com>
Date:   Fri May 29 16:54:06 2009 -0500

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

---

 dlls/ole32/storage32.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c
index ff95fad..9266bb7 100644
--- a/dlls/ole32/storage32.c
+++ b/dlls/ole32/storage32.c
@@ -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");




More information about the wine-cvs mailing list