mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
SyncJournalDB: Fix deleteBatch
This commit is contained in:
parent
e5a0db8782
commit
d7ac878efd
@ -236,6 +236,9 @@ void SqlQuery::bindValue(int pos, const QVariant& value)
|
||||
break; }
|
||||
}
|
||||
}
|
||||
if (res != SQLITE_OK) {
|
||||
qDebug() << Q_FUNC_INFO << "ERROR" << value.toString() << res;
|
||||
}
|
||||
Q_ASSERT( res == SQLITE_OK );
|
||||
}
|
||||
|
||||
|
||||
@ -667,6 +667,7 @@ static bool deleteBatch(SqlQuery & query, const QStringList & entries, const QSt
|
||||
qDebug() << "Removing stale " << qPrintable(name) << " entries: " << entries.join(", ");
|
||||
// FIXME: Was ported from execBatch, check if correct!
|
||||
foreach( const QString& entry, entries ) {
|
||||
query.reset();
|
||||
query.bindValue(1, entry);
|
||||
if (!query.exec()) {
|
||||
QString err = query.error();
|
||||
@ -675,7 +676,8 @@ static bool deleteBatch(SqlQuery & query, const QStringList & entries, const QSt
|
||||
return false;
|
||||
}
|
||||
}
|
||||
query.reset();
|
||||
query.reset(); // viel hilft viel ;-)
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user