IDEA-200404 Idea change Password Safe option silently on "cancel" in case selected DB is unaccessible

This commit is contained in:
Vladimir Krivosheev
2018-10-18 13:20:08 +02:00
parent ca1807cbaf
commit cc60ccfbdd
@@ -170,9 +170,7 @@ internal class PasswordSafeConfigurableUi : ConfigurableUi<PasswordSafeSettings>
settings.keepassDb = newDbFile.toString()
try {
runModalTask("Saving KeePass database", cancellable = false) {
KeePassFileManager(newDbFile, getDefaultMasterPasswordFile(), getEncryptionSpec(), secureRandom).useExisting()
}
KeePassFileManager(newDbFile, getDefaultMasterPasswordFile(), getEncryptionSpec(), secureRandom).useExisting()
}
catch (e: IncorrectMasterPasswordException) {
throw ConfigurationException("Master password for KeePass database is not correct (\"Clear\" can be used to reset database).")