mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
ownSql: Don't set busy timeout on bad object
This commit is contained in:
parent
105ff694f2
commit
ff570c4a6b
@ -50,11 +50,14 @@ bool SqlDatabase::open( const QString& filename )
|
||||
SQLITE_DO( sqlite3_open_v2(filename.toUtf8().constData(), &_db, flag, 0) );
|
||||
|
||||
if( _errId != SQLITE_OK ) {
|
||||
close(); // FIXME: Correct?
|
||||
qDebug() << Q_FUNC_INFO << "Error:" << _error;
|
||||
close();
|
||||
_db = 0;
|
||||
}
|
||||
|
||||
sqlite3_busy_timeout(_db, 5000);
|
||||
if (_db) {
|
||||
sqlite3_busy_timeout(_db, 5000);
|
||||
}
|
||||
|
||||
return isOpen();
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user