mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-17 12:02:48 +01:00
Mutex-lock DB to avoid concurrent access while doing backup DB, as it will be actually locked the DB, and what make Clementine stop if we try to modify it (e.g. add a new playlist)
This commit is contained in:
parent
25666f1395
commit
4caa3fc17e
@ -719,6 +719,7 @@ void Database::DoBackup() {
|
|||||||
QSqlDatabase db(this->Connect());
|
QSqlDatabase db(this->Connect());
|
||||||
|
|
||||||
// Before we overwrite anything, make sure the database is not corrupt
|
// Before we overwrite anything, make sure the database is not corrupt
|
||||||
|
QMutexLocker l(&mutex_);
|
||||||
const bool ok = IntegrityCheck(db);
|
const bool ok = IntegrityCheck(db);
|
||||||
|
|
||||||
if (ok) {
|
if (ok) {
|
||||||
|
Loading…
Reference in New Issue
Block a user