Correct two bugs related to key file opening

Bettter error messages with composite key
Show an error message if save has failed and don't close the database
This commit is contained in:
BONNEVILLE Geoffroy
2017-11-13 11:28:14 +01:00
parent 2779e5b7c7
commit abb12accc7
6 changed files with 65 additions and 27 deletions

View File

@@ -8,9 +8,7 @@ namespace ModernKeePass.ViewModels
public void Save(bool close = true)
{
var app = (App)Application.Current;
app.Database.Save();
if (!close) return;
app.Database.Close();
if (close && app.Database.Save()) app.Database.Close();
}
internal void Save(StorageFile file)