Vincent Povirk : ole32: Remove an unnecessary special case in StorageBaseImpl_CopyTo.

Alexandre Julliard julliard at winehq.org
Mon Dec 14 09:51:16 CST 2009


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

Author: Vincent Povirk <vincent at codeweavers.com>
Date:   Sun Dec 13 18:21:54 2009 -0600

ole32: Remove an unnecessary special case in StorageBaseImpl_CopyTo.

Opening a storage when it has already been opened now fails with
STG_E_ACCESSDENIED. If we attempt to copy a storage to its own child, this
will happen during the copy.

---

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

diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c
index 00ffe89..2d2c3d6 100644
--- a/dlls/ole32/storage32.c
+++ b/dlls/ole32/storage32.c
@@ -1674,16 +1674,6 @@ static HRESULT WINAPI StorageBaseImpl_CopyTo(
         goto cleanup;
 
       /*
-       * Check if destination storage is not a child of the source
-       * storage, which will cause an infinite loop
-       */
-      if (pstgChild == pstgDest)
-      {
-        hr = STG_E_ACCESSDENIED;
-        goto cleanup;
-      }
-
-      /*
        * create a new storage in destination storage
        */
       hr = IStorage_CreateStorage( pstgDest, curElement.pwcsName,




More information about the wine-cvs mailing list