Add: Clear various history tracking within registry, see issue #113

- you can re-enable this via tools->options->settings
This commit is contained in:
Tino Reichardt
2020-04-10 22:03:43 +02:00
parent 2314c89604
commit d78400f0b0
12 changed files with 114 additions and 19 deletions

View File

@@ -8,6 +8,8 @@
#include "../../../Windows/Registry.h"
#include "../../../Windows/Synchronization.h"
#include "../FileManager/RegistryUtils.h"
#include "ZipRegistry.h"
using namespace NWindows;
@@ -67,6 +69,7 @@ void CInfo::Save() const
CS_LOCK
CKey key;
CreateMainKey(key, kKeyName);
UStringVector Empty;
if (PathMode_Force)
key.SetValue(kExtractMode, (UInt32)PathMode);
@@ -80,7 +83,10 @@ void CInfo::Save() const
Key_Set_BoolPair(key, kShowPassword, ShowPassword);
key.RecurseDeleteKey(kPathHistory);
key.SetValue_Strings(kPathHistory, Paths);
if (WantPathHistory())
key.SetValue_Strings(kPathHistory, Paths);
else
key.SetValue_Strings(kPathHistory, Empty);
}
void Save_ShowPassword(bool showPassword)
@@ -198,6 +204,7 @@ static void GetRegUInt32(CKey &key, LPCTSTR name, UInt32 &value)
void CInfo::Save() const
{
UStringVector Empty;
CS_LOCK
CKey key;
@@ -214,7 +221,11 @@ void CInfo::Save() const
key.SetValue(kShowPassword, ShowPassword);
key.SetValue(kEncryptHeaders, EncryptHeaders);
key.RecurseDeleteKey(kArcHistory);
key.SetValue_Strings(kArcHistory, ArcPaths);
if (WantArcHistory())
key.SetValue_Strings(kArcHistory, ArcPaths);
else
key.SetValue_Strings(kArcHistory, Empty);
key.RecurseDeleteKey(kOptionsKeyName);
{