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
9fe16f8a
Commit
9fe16f8a
authored
Sep 30, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi/tests: Avoid corrupting the pending file renames key on failure.
parent
132158cb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
12 deletions
+7
-12
install.c
dlls/msi/tests/install.c
+7
-12
No files found.
dlls/msi/tests/install.c
View file @
9fe16f8a
...
...
@@ -8995,17 +8995,18 @@ static char rename_ops[] = "PendingFileRenameOperations";
static
void
process_pending_renames
(
HKEY
hkey
)
{
char
*
buf
,
*
src
,
*
dst
,
*
buf2
,
*
buf2ptr
;
DWORD
size
,
buf2len
=
0
;
DWORD
size
;
LONG
ret
;
BOOL
found
=
FALSE
;
ret
=
RegQueryValueExA
(
hkey
,
rename_ops
,
NULL
,
NULL
,
NULL
,
&
size
);
buf
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
buf2ptr
=
buf2
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
size
);
buf
[
0
]
=
0
;
buf
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
+
1
);
buf2ptr
=
buf2
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
size
+
1
);
ret
=
RegQueryValueExA
(
hkey
,
rename_ops
,
NULL
,
NULL
,
(
LPBYTE
)
buf
,
&
size
);
ok
(
!
ret
,
"RegQueryValueExA failed %d (%u)
\n
"
,
ret
,
GetLastError
());
buf
[
size
]
=
0
;
ok
(
!
ret
,
"RegQueryValueExA failed %d
\n
"
,
ret
);
if
(
ret
)
return
;
for
(
src
=
buf
;
*
src
;
src
=
dst
+
strlen
(
dst
)
+
1
)
{
...
...
@@ -9016,16 +9017,13 @@ static void process_pending_renames(HKEY hkey)
if
(
!
strstr
(
src
,
"msitest"
))
{
lstrcpyA
(
buf2ptr
,
src
);
buf2len
+=
strlen
(
src
)
+
1
;
buf2ptr
+=
strlen
(
src
)
+
1
;
if
(
*
dst
)
{
lstrcpyA
(
buf2ptr
,
dst
);
buf2ptr
+=
strlen
(
dst
)
+
1
;
buf2len
+=
strlen
(
dst
)
+
1
;
}
buf2ptr
++
;
buf2len
++
;
continue
;
}
...
...
@@ -9049,10 +9047,7 @@ static void process_pending_renames(HKEY hkey)
ok
(
found
,
"Expected a 'msitest' entry
\n
"
);
if
(
*
buf2
)
{
buf2len
++
;
RegSetValueExA
(
hkey
,
rename_ops
,
0
,
REG_MULTI_SZ
,
(
LPBYTE
)
buf2
,
buf2len
);
}
RegSetValueExA
(
hkey
,
rename_ops
,
0
,
REG_MULTI_SZ
,
(
LPBYTE
)
buf2
,
buf2ptr
+
1
-
buf2
);
else
RegDeleteValueA
(
hkey
,
rename_ops
);
...
...
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