[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:
Johannes Anderwald 2013-01-01 11:28:25 +00:00
parent 5becc492ad
commit e54416f256

View file

@ -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);