Commit b99cb051 authored by Robert Shearman's avatar Robert Shearman Committed by Alexandre Julliard

Cancel rename if value to rename to already exists.

parent 436145e9
......@@ -296,6 +296,9 @@ BOOL RenameValue(HWND hwnd, HKEY hKeyRoot, LPCTSTR keyPath, LPCTSTR oldName, LPC
lRet = RegOpenKeyEx(hKeyRoot, keyPath, 0, KEY_READ | KEY_SET_VALUE, &hKey);
if (lRet != ERROR_SUCCESS) return FALSE;
/* check if value already exists */
value = read_value(hwnd, hKey, newName, &type, &len);
if (value) goto done;
value = read_value(hwnd, hKey, oldName, &type, &len);
if(!value) goto done;
lRet = RegSetValueEx(hKey, newName, 0, type, (BYTE*)value, len);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment