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
81a030b9
Commit
81a030b9
authored
Mar 02, 2016
by
Hugh McMaster
Committed by
Alexandre Julliard
Mar 02, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reg: Delete the default registry value instead of overwriting it.
Signed-off-by:
Hugh McMaster
<
hugh.mcmaster@outlook.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
bf74c6a5
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
7 deletions
+3
-7
reg.c
programs/reg/reg.c
+2
-6
reg.c
programs/reg/tests/reg.c
+1
-1
No files found.
programs/reg/reg.c
View file @
81a030b9
...
...
@@ -525,19 +525,15 @@ static int reg_delete(WCHAR *key_name, WCHAR *value_name, BOOL value_empty,
/* FIXME delete failed */
}
}
else
if
(
value_name
)
else
if
(
value_name
||
value_empty
)
{
if
(
RegDeleteValueW
(
subkey
,
value_name
)
!=
ERROR_SUCCESS
)
if
(
RegDeleteValueW
(
subkey
,
value_empty
?
NULL
:
value_name
)
!=
ERROR_SUCCESS
)
{
RegCloseKey
(
subkey
);
output_message
(
STRING_CANNOT_FIND
);
return
1
;
}
}
else
if
(
value_empty
)
{
RegSetValueExW
(
subkey
,
NULL
,
0
,
REG_SZ
,
NULL
,
0
);
}
RegCloseKey
(
subkey
);
output_message
(
STRING_SUCCESS
);
...
...
programs/reg/tests/reg.c
View file @
81a030b9
...
...
@@ -441,7 +441,7 @@ static void test_delete(void)
run_reg_exe
(
"reg delete HKCU
\\
"
KEY_BASE
" /ve /f"
,
&
r
);
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %d, expected 0
\n
"
,
r
);
err
=
RegQueryValueExA
(
hkey
,
""
,
NULL
,
NULL
,
NULL
,
NULL
);
todo_wine
ok
(
err
==
ERROR_FILE_NOT_FOUND
,
"got %d
\n
"
,
err
);
ok
(
err
==
ERROR_FILE_NOT_FOUND
,
"got %d, expected 2
\n
"
,
err
);
run_reg_exe
(
"reg delete HKCU
\\
"
KEY_BASE
" /va /f"
,
&
r
);
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %d, expected 0
\n
"
,
r
);
...
...
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