Author: janderwald
Date: Tue Jan 1 11:28:25 2013
New Revision: 58079
URL: http://svn.reactos.org/svn/reactos?rev=58079&view=rev
Log:
[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
Modified:
trunk/reactos/base/applications/regedit/edit.c
Modified: trunk/reactos/base/applications/regedit/edit.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/…
==============================================================================
--- trunk/reactos/base/applications/regedit/edit.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/regedit/edit.c [iso-8859-1] Tue Jan 1 11:28:25 2013
@@ -1399,6 +1399,12 @@
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);