diff --git a/PartialKeePassDatabaseExportExt.cs b/PartialKeePassDatabaseExportExt.cs index 71d78a4..3c519ff 100644 --- a/PartialKeePassDatabaseExportExt.cs +++ b/PartialKeePassDatabaseExportExt.cs @@ -221,7 +221,17 @@ private void ExportToNewDatabase(PwDatabase pdOriginal, IStatusLogger slLogger, if (exportConfig.ClearTotpStringEntry) { // remove TOTP secret key (when using the https://keepass.info/plugins.html#keeotp plugin) - pwEntryClone.Strings.Remove(Constants.ConfigPwStringName_Otp); + var keyExists = pwEntryClone.Strings.Exists(Constants.ConfigPwStringName_Otp); + if (keyExists) + { + pwEntryClone.Strings.Remove(Constants.ConfigPwStringName_Otp); + var title = pwEntryClone.Strings.Get(PwDefs.TitleField); + // add hint that 2FA key has been removed, but only if title is not empty (that's fishy) + if (!string.IsNullOrEmpty(title.ReadString())) + { + pwEntryClone.Strings.Set(PwDefs.TitleField, new ProtectedString(title.IsProtected, title.ReadString() + " [2FA removed]")); + } + } } pd.RootGroup.AddEntry(pwEntryClone, true); } diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index db7660d..93bb473 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.1.0.0")] -[assembly: AssemblyFileVersion("1.1.0.0")] +[assembly: AssemblyVersion("1.1.1.0")] +[assembly: AssemblyFileVersion("1.1.1.0")]