Another fix to stop incorrectly removing the lock file

git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@321 b624d157-de02-0410-bad0-e51aec6abb33
master
sniperbeamer 15 years ago
parent 63c21e3ac5
commit 50d5a10ff0
  1. 3
      src/mainwindow.cpp

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