diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c index 646c8b80105..9c38a65c3e6 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 );