Browse Source

Bug fix: Cleaning up cached SSH host keys did not work + Cleaning up configuration did not remove jumplist

Caused by 7861d4c8

Source commit: 92f018ea3bacd86894989c4f658123556619b62d
Martin Prikryl 6 years ago
parent
commit
8c646ce6af
1 changed files with 4 additions and 2 deletions
  1. 4 2
      source/core/HierarchicalStorage.cpp

+ 4 - 2
source/core/HierarchicalStorage.cpp

@@ -385,10 +385,12 @@ void __fastcall THierarchicalStorage::RecursiveDeleteSubKey(const UnicodeString
       ClearValues();
     }
 
+    // Only if all subkeys were successfully deleted in ClearSubKeys
+    bool Delete = CanWriteParent && !HasSubKeys();
+
     CloseSubKey();
 
-    // Only if all subkeys were successfully deleted in ClearSubKeys
-    if (CanWriteParent && HasSubKeys())
+    if (Delete)
     {
       DoDeleteSubKey(Key);
     }