mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
SyncJournal: Check file existence even for open dbs #6049
With WAL mode sqlite seems to occasionally crash when the underlying filesystem goes away.
This commit is contained in:
parent
ce06c96135
commit
b1224cff0c
@ -272,6 +272,11 @@ bool SyncJournalDb::sqlFail(const QString &log, const SqlQuery &query)
|
||||
bool SyncJournalDb::checkConnect()
|
||||
{
|
||||
if (_db.isOpen()) {
|
||||
if (!QFile::exists(_dbFile)) {
|
||||
qCWarning(lcDb) << "Database open, but file file" + _dbFile + " does not exist";
|
||||
close();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user