mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2025-12-04 15:49:33 +01:00
Fix binaries unique Ids #713
This commit is contained in:
@@ -44,6 +44,8 @@ class DatabaseKDB : DatabaseVersioned<Int, UUID, GroupKDB, EntryKDB>() {
|
||||
|
||||
private var kdfListV3: MutableList<KdfEngine> = ArrayList()
|
||||
|
||||
private var binaryIncrement = 0
|
||||
|
||||
override val version: String
|
||||
get() = "KeePass 1"
|
||||
|
||||
@@ -264,8 +266,9 @@ class DatabaseKDB : DatabaseVersioned<Int, UUID, GroupKDB, EntryKDB>() {
|
||||
}
|
||||
|
||||
fun buildNewBinary(cacheDirectory: File): BinaryAttachment {
|
||||
// Generate an unique new file with timestamp
|
||||
val fileInCache = File(cacheDirectory, System.currentTimeMillis().toString())
|
||||
// Generate an unique new file
|
||||
val fileInCache = File(cacheDirectory, binaryIncrement.toString())
|
||||
binaryIncrement++
|
||||
return BinaryAttachment(fileInCache)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user