Browse Source

make sure to mark entry as dirty when deleting binary.

remove-cryptography-dependency
Herbert Poul 5 years ago
parent
commit
bfea711921
  1. 1
      lib/src/kdbx_entry.dart
  2. 1
      test/kdbx_binaries_test.dart

1
lib/src/kdbx_entry.dart

@ -229,6 +229,7 @@ class KdbxEntry extends KdbxObject {
if (!binary.isInline) {
file.ctx.removeBinary(binary);
}
isDirty = true;
}
KdbxKey _uniqueBinaryName(String fileName) {

1
test/kdbx_binaries_test.dart

@ -140,6 +140,7 @@ void main() {
expect(file.ctx.binariesIterable, hasLength(2));
entry.removeBinary(KdbxKey('example2.txt'));
expect(file.ctx.binariesIterable, hasLength(1));
expect(file.dirtyObjects, [entry]);
return await file.save();
})();
final file = await TestUtil.readKdbxFileBytes(saved);

Loading…
Cancel
Save