TRegistry.DeleteKey inconsistent behaviour Windows vs other platforms
Original Reporter info from Mantis: Bart @flyingsheep
-
Reporter name: Bart Broersma
Original Reporter info from Mantis: Bart @flyingsheep
- Reporter name: Bart Broersma
Description:
On non-windows platforms TRegistry uses a TXMLRegistry.
If you use DeleteKey(Key) on Wondows it will only delete Key if Key has no subkeys.
The XML implementation however hapilly removes the Key including all subkeys.
Steps to reproduce:
Build and run attached example.
Expected output: EAssertionFailed: DeleteKey('One') failed. (delkey.pp, line 51)
On Linux however (an presumably all non-Windows platform it runs to the end.
And it will create the following xml:
<?xml version="1.0" encoding="utf-8"?>
<XMLReg>
<Key Name="HKEY_CURRENT_USER">
<Key Name="Software">
<Key Name="TESTDELTREE">
<Value Name="0" Type="2">0</Value>
</Key>
</Key>
</Key>
</XMLReg>
Mantis conversion info:
- Mantis ID: 35132
- OS: Windows
- OS Build: 10
- Build: r41343
- Platform: i386
- Version: 3.3.1
- Fixed in version: 3.3.1
- Fixed in revision: 41817 (#6bfaec84)
- Target version: 3.2.0