[3/3] ole32: Use a shortcut in DataCache_Save only if fSameAsLoad set to TRUE.

Huw Davies huw at codeweavers.com
Wed Sep 20 07:51:44 CDT 2017


On Wed, Sep 20, 2017 at 02:54:21PM +0300, Dmitry Timoshkov wrote:
> This looks like a typo, and this patch makes saving data in a pretty complex
> application work.
> 
> Signed-off-by: Dmitry Timoshkov <dmitry at baikal.ru>
> ---
>  dlls/ole32/datacache.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/dlls/ole32/datacache.c b/dlls/ole32/datacache.c
> index 4e684b4189..c3383176f8 100644
> --- a/dlls/ole32/datacache.c
> +++ b/dlls/ole32/datacache.c
> @@ -1663,7 +1663,7 @@ static HRESULT WINAPI DataCache_Save(
>      }
>  
>      /* this is a shortcut if nothing changed */
> -    if (!dirty && !fSameAsLoad && This->presentationStorage)
> +    if (!dirty && fSameAsLoad && This->presentationStorage)
>      {
>          return IStorage_CopyTo(This->presentationStorage, 0, NULL, NULL, pStg);
>      }

No, this isn't a typo.  The idea is to copy the loaded storage to a
fresh storage that is passed when fSameAsLoad is FALSE.

I'm aware that there are issues related to the storage handling
in both the cache and the default handler.  That's on my list
of things to look into, but feel free to investigate further.

Huw.



More information about the wine-devel mailing list