diff --git a/lib/src/kdbx_entry.dart b/lib/src/kdbx_entry.dart index 8ac97a5..a8394e6 100644 --- a/lib/src/kdbx_entry.dart +++ b/lib/src/kdbx_entry.dart @@ -84,7 +84,8 @@ class KdbxEntry extends KdbxObject { } return XmlElement(XmlName(KdbxXml.NODE_STRING)) ..children.addAll([ - XmlElement(XmlName(KdbxXml.ATTR_PROTECTED)) + XmlElement(XmlName(KdbxXml.ATTR_PROTECTED)), + XmlElement(XmlName(KdbxXml.NODE_KEY)) ..children.add(XmlText(stringEntry.key.key)), value, ]); diff --git a/lib/src/kdbx_object.dart b/lib/src/kdbx_object.dart index 8baa369..a7a3499 100644 --- a/lib/src/kdbx_object.dart +++ b/lib/src/kdbx_object.dart @@ -68,11 +68,13 @@ abstract class KdbxObject extends KdbxNode { @override set isDirty(bool dirty) { - super.isDirty = dirty; if (dirty) { times.modifiedNow(); - file.dirtyObject(this); + if (!isDirty && dirty) { + file.dirtyObject(this); + } } + super.isDirty = dirty; } @override