diff --git a/lib/src/kdbx_entry.dart b/lib/src/kdbx_entry.dart index c61080a..fb769f7 100644 --- a/lib/src/kdbx_entry.dart +++ b/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) { diff --git a/test/kdbx_binaries_test.dart b/test/kdbx_binaries_test.dart index 7f11692..6b60ef1 100644 --- a/test/kdbx_binaries_test.dart +++ b/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);