mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-08-24 05:59:37 -04:00
Do not try to open a non-existing database.
This commit is contained in:
parent
886187baee
commit
15c18dd899
1 changed files with 5 additions and 0 deletions
|
@ -105,6 +105,11 @@ void DatabaseTabWidget::openDatabase(const QString& fileName, const QString& pw,
|
||||||
{
|
{
|
||||||
QFileInfo fileInfo(fileName);
|
QFileInfo fileInfo(fileName);
|
||||||
QString canonicalFilePath = fileInfo.canonicalFilePath();
|
QString canonicalFilePath = fileInfo.canonicalFilePath();
|
||||||
|
if (canonicalFilePath.isEmpty()) {
|
||||||
|
QMessageBox::warning(this, tr("Warning"), tr("File not found!"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
QHashIterator<Database*, DatabaseManagerStruct> i(m_dbList);
|
QHashIterator<Database*, DatabaseManagerStruct> i(m_dbList);
|
||||||
while (i.hasNext()) {
|
while (i.hasNext()) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue