Ignore SSH keys in Recycle Bin, fixes #1396

This commit is contained in:
Toni Spets 2018-01-20 11:19:09 +02:00
parent cfe8ca9836
commit 5231d07fdf

View File

@ -217,8 +217,14 @@ void SSHAgent::databaseModeChanged(DatabaseWidget::Mode mode)
} else if (mode == DatabaseWidget::ViewMode && !m_keys.contains(uuid.toHex())) { } else if (mode == DatabaseWidget::ViewMode && !m_keys.contains(uuid.toHex())) {
for (Entry* e : widget->database()->rootGroup()->entriesRecursive()) { for (Entry* e : widget->database()->rootGroup()->entriesRecursive()) {
if (!e->attachments()->hasKey("KeeAgent.settings")) if (widget->database()->metadata()->recycleBinEnabled()
&& e->group() == widget->database()->metadata()->recycleBin()) {
continue; continue;
}
if (!e->attachments()->hasKey("KeeAgent.settings")) {
continue;
}
KeeAgentSettings settings; KeeAgentSettings settings;
settings.fromXml(e->attachments()->value("KeeAgent.settings")); settings.fromXml(e->attachments()->value("KeeAgent.settings"));