Andrew Eikum : ole32: Use snbExclude in StorageImpl::CopyTo.

Alexandre Julliard julliard at winehq.org
Tue Oct 6 10:35:48 CDT 2009


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

Author: Andrew Eikum <aeikum at codeweavers.com>
Date:   Mon Oct  5 16:13:55 2009 -0500

ole32: Use snbExclude in StorageImpl::CopyTo.

---

 dlls/ole32/storage32.c |   20 ++++++++++++++++++--
 1 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c
index 646c8b8..9c38a65 100644
--- a/dlls/ole32/storage32.c
+++ b/dlls/ole32/storage32.c
@@ -1462,8 +1462,9 @@ static HRESULT WINAPI StorageImpl_CopyTo(
   HRESULT      hr;
   IStorage     *pstgTmp, *pstgChild;
   IStream      *pstrTmp, *pstrChild;
+  BOOL         skip = FALSE;
 
-  if ((ciidExclude != 0) || (rgiidExclude != NULL) || (snbExclude != NULL))
+  if ((ciidExclude != 0) || (rgiidExclude != NULL))
     FIXME("Exclude option not implemented\n");
 
   TRACE("(%p, %d, %p, %p, %p)\n",
@@ -1500,6 +1501,21 @@ static HRESULT WINAPI StorageImpl_CopyTo(
       break;
     }
 
+    if ( snbExclude )
+    {
+      WCHAR **snb = snbExclude;
+      skip = FALSE;
+      while ( *snb != NULL && !skip )
+      {
+        if ( lstrcmpW(curElement.pwcsName, *snb) == 0 )
+          skip = TRUE;
+        ++snb;
+      }
+    }
+
+    if ( skip )
+      continue;
+
     if (curElement.type == STGTY_STORAGE)
     {
       /*
@@ -1548,7 +1564,7 @@ static HRESULT WINAPI StorageImpl_CopyTo(
        * do the copy recursively
        */
       hr = IStorage_CopyTo( pstgChild, ciidExclude, rgiidExclude,
-                               snbExclude, pstgTmp );
+                               NULL, pstgTmp );
 
       IStorage_Release( pstgTmp );
       IStorage_Release( pstgChild );




More information about the wine-cvs mailing list