mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 09:46:18 +00:00
[REGEDIT]
- Check if the new name equals the old name. In that case don't rename key. - Fixes regedit accidentaly deleting keys when a key is clicked and the rename field appears CORE-6205 #resolve #comment finally regedit is usable svn path=/trunk/; revision=58079
This commit is contained in:
parent
5becc492ad
commit
e54416f256
1 changed files with 6 additions and 0 deletions
|
@ -1399,6 +1399,12 @@ static LONG MoveKey(HKEY hDestKey, LPCWSTR lpDestSubKey, HKEY hSrcKey, LPCWSTR l
|
|||
if (!lpSrcSubKey)
|
||||
return ERROR_INVALID_FUNCTION;
|
||||
|
||||
if (wcscmp(lpDestSubKey, lpSrcSubKey) == 0)
|
||||
{
|
||||
/* destination name equals source name */
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
lResult = CopyKey(hDestKey, lpDestSubKey, hSrcKey, lpSrcSubKey);
|
||||
if (lResult == ERROR_SUCCESS)
|
||||
SHDeleteKey(hSrcKey, lpSrcSubKey);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue