Remove lock file if opening the database failed

git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@280 b624d157-de02-0410-bad0-e51aec6abb33
master
sniperbeamer 16 years ago
parent 139078801c
commit 0ec14cb61c
  1. 1
      src/mainwindow.cpp

@ -470,6 +470,7 @@ bool KeepassMainWindow::openDatabase(QString filename,bool IsAuto){
setStateFileModified(static_cast<Kdb3Database*>(db)->hasPasswordEncodingChanged());
}
else{
QFile::remove(filename+".lock");
setStatusBarMsg(StatusBarLoadingFailed);
QString error=db->getError();
if(error.isEmpty())error=tr("Unknown error while loading database.");