mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-25 05:45:42 +03:00
Poll Jobs: Properly use DB index
Why do we sometimes use 0-based, sometimes 1-based indices?
This commit is contained in:
parent
c460b3f3be
commit
79c37f9fe4
1 changed files with 5 additions and 4 deletions
|
@ -1164,8 +1164,9 @@ void SyncJournalDb::setPollInfo(const SyncJournalDb::PollInfo& info)
|
|||
}
|
||||
|
||||
if (info._url.isEmpty()) {
|
||||
qDebug() << "Deleting Poll job" << info._file;
|
||||
SqlQuery query("DELETE FROM poll WHERE path=?", _db);
|
||||
query.bindValue(0, info._file);
|
||||
query.bindValue(1, info._file);
|
||||
if( !query.exec() ) {
|
||||
qDebug() << "SQL error in setPollInfo: "<< query.error();
|
||||
} else {
|
||||
|
@ -1173,9 +1174,9 @@ void SyncJournalDb::setPollInfo(const SyncJournalDb::PollInfo& info)
|
|||
}
|
||||
} else {
|
||||
SqlQuery query("INSERT OR REPLACE INTO poll (path, modtime, pollpath) VALUES( ? , ? , ? )", _db);
|
||||
query.bindValue(0, info._file);
|
||||
query.bindValue(1, QString::number(info._modtime));
|
||||
query.bindValue(2, info._url);
|
||||
query.bindValue(1, info._file);
|
||||
query.bindValue(2, QString::number(info._modtime));
|
||||
query.bindValue(3, info._url);
|
||||
if( !query.exec() ) {
|
||||
qDebug() << "SQL error in setPollInfo: "<< query.error();
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue