Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
2a4bbb88
Commit
2a4bbb88
authored
Dec 08, 2017
by
Huw Davies
Committed by
Alexandre Julliard
Dec 08, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Don't clear the dirty flag when saving to another storage.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a3436079
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
datacache.c
dlls/ole32/datacache.c
+6
-9
ole2.c
dlls/ole32/tests/ole2.c
+3
-0
No files found.
dlls/ole32/datacache.c
View file @
2a4bbb88
...
...
@@ -1835,17 +1835,14 @@ static HRESULT WINAPI DataCache_Load( IPersistStorage *iface, IStorage *pStg )
* our responsibility to copy the information when saving to a new
* storage.
*/
static
HRESULT
WINAPI
DataCache_Save
(
IPersistStorage
*
iface
,
IStorage
*
pStg
,
BOOL
fSameAsLoad
)
static
HRESULT
WINAPI
DataCache_Save
(
IPersistStorage
*
iface
,
IStorage
*
stg
,
BOOL
same_as_load
)
{
DataCache
*
This
=
impl_from_IPersistStorage
(
iface
);
DataCacheEntry
*
cache_entry
;
HRESULT
hr
=
S_OK
;
unsigned
short
stream_number
=
0
;
TRACE
(
"(%p, %p, %d)
\n
"
,
iface
,
pStg
,
fSameAsL
oad
);
TRACE
(
"(%p, %p, %d)
\n
"
,
iface
,
stg
,
same_as_l
oad
);
/* assign stream numbers to the cache entries */
LIST_FOR_EACH_ENTRY
(
cache_entry
,
&
This
->
cache_list
,
DataCacheEntry
,
entry
)
...
...
@@ -1861,17 +1858,17 @@ static HRESULT WINAPI DataCache_Save(
/* write out the cache entries */
LIST_FOR_EACH_ENTRY
(
cache_entry
,
&
This
->
cache_list
,
DataCacheEntry
,
entry
)
{
if
(
!
fSameAsL
oad
||
cache_entry
->
dirty
)
if
(
!
same_as_l
oad
||
cache_entry
->
dirty
)
{
hr
=
DataCacheEntry_Save
(
cache_entry
,
pStg
,
fSameAsL
oad
);
hr
=
DataCacheEntry_Save
(
cache_entry
,
stg
,
same_as_l
oad
);
if
(
FAILED
(
hr
))
break
;
cache_entry
->
dirty
=
FALSE
;
if
(
same_as_load
)
cache_entry
->
dirty
=
FALSE
;
}
}
This
->
dirty
=
FALSE
;
if
(
same_as_load
)
This
->
dirty
=
FALSE
;
return
hr
;
}
...
...
dlls/ole32/tests/ole2.c
View file @
2a4bbb88
...
...
@@ -4320,6 +4320,9 @@ static void test_data_cache_save_data(void)
hr
=
IPersistStorage_Save
(
persist
,
doc
,
FALSE
);
ok
(
hr
==
S_OK
,
"unexpected %#x
\n
"
,
hr
);
hr
=
IPersistStorage_IsDirty
(
persist
);
ok
(
hr
==
S_OK
,
"unexpected %#x
\n
"
,
hr
);
check_storage_contents
(
doc
,
&
pdata
->
stg_def
,
&
enumerated_streams
,
&
matched_streams
);
ok
(
enumerated_streams
==
matched_streams
,
"enumerated %d != matched %d
\n
"
,
enumerated_streams
,
matched_streams
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment