mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-11-25 01:03:35 -05:00
Do not show misleading error message if user clicked cancel
Signed-off-by: Sven Strickroth <email@cs-ware.de>
This commit is contained in:
parent
44daca921a
commit
002b8fee15
1 changed files with 3 additions and 0 deletions
|
|
@ -132,6 +132,9 @@ void KeyFileEditWidget::browseKeyFile()
|
|||
QString filters = QString("%1 (*.keyx *.key);;%2 (*)").arg(tr("Key files"), tr("All files"));
|
||||
QString fileName = fileDialog()->getOpenFileName(this, tr("Select a key file"), QString(), filters);
|
||||
|
||||
if (fileName.isEmpty()) { // user clicked on cancel
|
||||
return;
|
||||
}
|
||||
if (QFileInfo(fileName).canonicalFilePath() == m_parent->getDatabase()->canonicalFilePath()) {
|
||||
MessageBox::critical(getMainWindow(),
|
||||
tr("Invalid Key File"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue