mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2026-11-29 21:33:07 -08:00
Fix concurrent modification
This commit is contained in:
1 parent
3f33733f40
commit
98ad33a589
2 files changed
+2
-5
No files matched your search
@@ -450,6 +450,7 @@ class Entry : Node, EntryVersionedInterface<Group> {
|
||||
database?.startManageEntry(this)
|
||||
|
||||
removeAllFields()
|
||||
removeAllAttachments()
|
||||
// NodeId stay as is
|
||||
title = newEntryInfo.title
|
||||
icon = newEntryInfo.icon
|
||||
@@ -461,8 +462,6 @@ class Entry : Node, EntryVersionedInterface<Group> {
|
||||
notes = newEntryInfo.notes
|
||||
addExtraFields(newEntryInfo.customFields)
|
||||
database?.binaryPool?.let { binaryPool ->
|
||||
// TODO Concurrent modification
|
||||
// removeAllAttachments()
|
||||
addAttachments(binaryPool, newEntryInfo.attachments)
|
||||
}
|
||||
|
||||
|
||||
@@ -310,9 +310,7 @@ class EntryKDBX : EntryVersioned<UUID, UUID, GroupKDBX, EntryKDBX>, NodeKDBXInte
|
||||
}
|
||||
|
||||
fun removeAttachments() {
|
||||
binaries.keys.forEach {
|
||||
binaries.remove(it)
|
||||
}
|
||||
binaries.clear()
|
||||
}
|
||||
|
||||
private fun getAttachmentsSize(binaryPool: BinaryPool): Long {
|
||||
|
||||
Reference in new issue
Block a user