Merge pull request #1408 from hifi/fix/sshagent-recyclebin

Ignore SSH keys in Recycle Bin, fixes #1396
This commit is contained in:
Janek Bevendorff 2018-01-20 17:18:58 +01:00 committed by GitHub
commit 5e30214e4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -217,8 +217,14 @@ void SSHAgent::databaseModeChanged(DatabaseWidget::Mode mode)
} else if (mode == DatabaseWidget::ViewMode && !m_keys.contains(uuid.toHex())) {
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;
}
if (!e->attachments()->hasKey("KeeAgent.settings")) {
continue;
}
KeeAgentSettings settings;
settings.fromXml(e->attachments()->value("KeeAgent.settings"));