mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-27 17:37:36 +03:00
SyncJournal: Explain added file-exists check
This commit is contained in:
parent
cc04ce9fe4
commit
8147963b24
1 changed files with 3 additions and 1 deletions
|
@ -273,8 +273,10 @@ bool SyncJournalDb::sqlFail(const QString &log, const SqlQuery &query)
|
||||||
bool SyncJournalDb::checkConnect()
|
bool SyncJournalDb::checkConnect()
|
||||||
{
|
{
|
||||||
if (_db.isOpen()) {
|
if (_db.isOpen()) {
|
||||||
|
// Unfortunately the sqlite isOpen check can return true even when the underlying storage
|
||||||
|
// has become unavailable - and then some operations may cause crashes. See #6049
|
||||||
if (!QFile::exists(_dbFile)) {
|
if (!QFile::exists(_dbFile)) {
|
||||||
qCWarning(lcDb) << "Database open, but file file" + _dbFile + " does not exist";
|
qCWarning(lcDb) << "Database open, but file " + _dbFile + " does not exist";
|
||||||
close();
|
close();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue