Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
6b1a1579
Commit
6b1a1579
authored
Jun 11, 2010
by
Hans Leidekker
Committed by
Alexandre Julliard
Jun 11, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Update an existing record even if the low bit in the transform mask is set.
parent
73774b3e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
44 deletions
+53
-44
table.c
dlls/msi/table.c
+52
-43
patch.c
dlls/msi/tests/patch.c
+1
-1
No files found.
dlls/msi/table.c
View file @
6b1a1579
...
...
@@ -2742,63 +2742,72 @@ static UINT msi_table_load_transform( MSIDATABASE *db, IStorage *stg,
rec
=
msi_get_transform_record
(
tv
,
st
,
stg
,
&
rawdata
[
n
],
bytes_per_strref
);
if
(
rec
)
{
if
(
mask
&
1
)
{
WCHAR
table
[
32
];
DWORD
sz
=
32
;
UINT
number
=
MSI_NULL_INTEGER
;
TRACE
(
"inserting record
\n
"
);
WCHAR
table
[
32
];
DWORD
sz
=
32
;
UINT
number
=
MSI_NULL_INTEGER
;
UINT
row
=
0
;
if
(
!
lstrcmpW
(
name
,
szColumns
))
if
(
!
lstrcmpW
(
name
,
szColumns
))
{
MSI_RecordGetStringW
(
rec
,
1
,
table
,
&
sz
);
number
=
MSI_RecordGetInteger
(
rec
,
2
);
/*
* Native msi seems writes nul into the Number (2nd) column of
* the _Columns table, only when the columns are from a new table
*/
if
(
number
==
MSI_NULL_INTEGER
)
{
MSI_RecordGetStringW
(
rec
,
1
,
table
,
&
sz
);
number
=
MSI_RecordGetInteger
(
rec
,
2
);
/*
* Native msi seems writes nul into the Number (2nd) column of
* the _Columns table, only when the columns are from a new table
*/
if
(
number
==
MSI_NULL_INTEGER
)
/* reset the column number on a new table */
if
(
lstrcmpW
(
coltable
,
table
))
{
/* reset the column number on a new table */
if
(
lstrcmpW
(
coltable
,
table
)
)
{
colcol
=
0
;
lstrcpyW
(
coltable
,
table
);
}
/* fix nul column numbers */
MSI_RecordSetInteger
(
rec
,
2
,
++
colcol
);
colcol
=
0
;
lstrcpyW
(
coltable
,
table
);
}
/* fix nul column numbers */
MSI_RecordSetInteger
(
rec
,
2
,
++
colcol
);
}
}
r
=
TABLE_insert_row
(
&
tv
->
view
,
rec
,
-
1
,
FALSE
);
if
(
r
!=
ERROR_SUCCESS
)
WARN
(
"insert row failed
\n
"
);
if
(
TRACE_ON
(
msidb
))
dump_record
(
rec
);
if
(
number
!=
MSI_NULL_INTEGER
&&
!
lstrcmpW
(
name
,
szColumns
)
)
msi_update_table_columns
(
db
,
table
);
}
else
r
=
msi_table_find_row
(
tv
,
rec
,
&
row
);
if
(
r
==
ERROR_SUCCESS
)
{
UINT
row
=
0
;
r
=
msi_table_find_row
(
tv
,
rec
,
&
row
);
if
(
r
!=
ERROR_SUCCESS
)
WARN
(
"no matching row to transform
\n
"
);
else
if
(
mask
)
if
(
!
mask
)
{
TRACE
(
"modifying row [%d]:
\n
"
,
row
);
TABLE_set_row
(
&
tv
->
view
,
row
,
rec
,
mask
);
TRACE
(
"deleting row [%d]:
\n
"
,
row
);
r
=
TABLE_delete_row
(
&
tv
->
view
,
row
);
if
(
r
!=
ERROR_SUCCESS
)
WARN
(
"failed to delete row %u
\n
"
,
r
);
}
else
if
(
mask
&
1
)
{
TRACE
(
"modifying full row [%d]:
\n
"
,
row
);
r
=
TABLE_set_row
(
&
tv
->
view
,
row
,
rec
,
(
1
<<
tv
->
num_cols
)
-
1
);
if
(
r
!=
ERROR_SUCCESS
)
WARN
(
"failed to modify row %u
\n
"
,
r
);
}
else
{
TRACE
(
"deleting row [%d]:
\n
"
,
row
);
TABLE_delete_row
(
&
tv
->
view
,
row
);
TRACE
(
"modifying masked row [%d]:
\n
"
,
row
);
r
=
TABLE_set_row
(
&
tv
->
view
,
row
,
rec
,
mask
);
if
(
r
!=
ERROR_SUCCESS
)
WARN
(
"failed to modify row %u
\n
"
,
r
);
}
}
if
(
TRACE_ON
(
msidb
)
)
dump_record
(
rec
);
else
{
TRACE
(
"inserting row
\n
"
);
r
=
TABLE_insert_row
(
&
tv
->
view
,
rec
,
-
1
,
FALSE
);
if
(
r
!=
ERROR_SUCCESS
)
WARN
(
"failed to insert row %u
\n
"
,
r
);
}
if
(
number
!=
MSI_NULL_INTEGER
&&
!
lstrcmpW
(
name
,
szColumns
))
msi_update_table_columns
(
db
,
table
);
msiobj_release
(
&
rec
->
hdr
);
}
...
...
dlls/msi/tests/patch.c
View file @
6b1a1579
...
...
@@ -794,7 +794,7 @@ static void test_simple_patch( void )
ok
(
r
==
ERROR_SUCCESS
,
"expected ERROR_SUCCESS, got %u
\n
"
,
r
);
r
=
MsiViewFetch
(
hview
,
&
hrec
);
todo_wine
ok
(
r
==
ERROR_SUCCESS
,
"expected ERROR_SUCCESS, got %u
\n
"
,
r
);
ok
(
r
==
ERROR_SUCCESS
,
"expected ERROR_SUCCESS, got %u
\n
"
,
r
);
MsiCloseHandle
(
hrec
);
MsiViewClose
(
hview
);
...
...
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