mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2026-12-04 07:42:30 -08:00
Fix Search shows Backup entries #320
This commit is contained in:
1 parent
29eec05f8f
commit
a6bdca52be
1 file changed
+15
-4
@@ -322,11 +322,22 @@ class PwDatabaseV4 : PwDatabase<PwGroupV4, PwEntryV4> {
|
||||
}
|
||||
|
||||
override fun isBackup(group: PwGroupV4): Boolean {
|
||||
if (recycleBin == null)
|
||||
return false
|
||||
return if (!isRecycleBinEnabled) {
|
||||
// To keep compatibility with old V1 databases
|
||||
var currentGroup: PwGroupV4? = group
|
||||
while (currentGroup != null) {
|
||||
if (currentGroup.parent == rootGroup
|
||||
&& currentGroup.title.equals("Backup", ignoreCase = true)) {
|
||||
return true
|
||||
}
|
||||
currentGroup = currentGroup.parent
|
||||
}
|
||||
|
||||
return if (recycleBin == null)
|
||||
false
|
||||
} else group.isContainedIn(recycleBin!!)
|
||||
else if (!isRecycleBinEnabled)
|
||||
false
|
||||
else
|
||||
group.isContainedIn(recycleBin!!)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user