Skip to content

Commit

Permalink
Don't remember key file folder if disabled
Browse files Browse the repository at this point in the history
* Fixes #10557
  • Loading branch information
droidmonkey committed Apr 28, 2024
1 parent 19d4f73 commit 9a65ffe
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/gui/DatabaseOpenWidget.cpp
Expand Up @@ -470,7 +470,11 @@ bool DatabaseOpenWidget::browseKeyFile()
if (filename.isEmpty()) {
return false;
}
FileDialog::saveLastDir("keyfile", filename, true);
if (config()->get(Config::RememberLastKeyFiles).toBool()) {
FileDialog::saveLastDir("keyfile", filename, true);
} else {
FileDialog::saveLastDir("keyfile", {});
}

if (QFileInfo(filename).canonicalFilePath() == QFileInfo(m_filename).canonicalFilePath()) {
MessageBox::warning(this,
Expand Down

0 comments on commit 9a65ffe

Please sign in to comment.