mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
SyncJournalDb::setSelectiveSyncList: Always use a transaction
Issue #6431
This commit is contained in:
parent
0afcb23734
commit
613fd30021
@ -1886,6 +1886,8 @@ void SyncJournalDb::setSelectiveSyncList(SyncJournalDb::SelectiveSyncListType ty
|
||||
return;
|
||||
}
|
||||
|
||||
startTransaction();
|
||||
|
||||
//first, delete all entries of this type
|
||||
SqlQuery delQuery("DELETE FROM selectivesync WHERE type == ?1", _db);
|
||||
delQuery.bindValue(1, int(type));
|
||||
@ -1902,6 +1904,8 @@ void SyncJournalDb::setSelectiveSyncList(SyncJournalDb::SelectiveSyncListType ty
|
||||
qCWarning(lcDb) << "SQL error when inserting into selective sync" << type << path << delQuery.error();
|
||||
}
|
||||
}
|
||||
|
||||
commitInternal("setSelectiveSyncList");
|
||||
}
|
||||
|
||||
void SyncJournalDb::avoidRenamesOnNextSync(const QByteArray &path)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user