mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-23 13:35:58 +03:00
Fix E2E query
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
6c11c1aa73
commit
24efdd3b45
1 changed files with 8 additions and 3 deletions
|
@ -977,14 +977,19 @@ bool SyncJournalDb::getFileRecordByE2eMangledName(const QString &mangledName, Sy
|
|||
rec->_path.clear();
|
||||
Q_ASSERT(!rec->isValid());
|
||||
|
||||
if (_metadataTableIsEmpty)
|
||||
if (_metadataTableIsEmpty) {
|
||||
return true; // no error, yet nothing found (rec->isValid() == false)
|
||||
}
|
||||
|
||||
if (!checkConnect())
|
||||
if (!checkConnect()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!mangledName.isEmpty()) {
|
||||
_getFileRecordQueryByMangledName.reset_and_clear_bindings();
|
||||
if (!_getFileRecordQueryByMangledName.initOrReset(QByteArrayLiteral(GET_FILE_RECORD_QUERY " WHERE e2eMangledName=?1"), _db)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
_getFileRecordQueryByMangledName.bindValue(1, mangledName);
|
||||
|
||||
if (!_getFileRecordQueryByMangledName.exec()) {
|
||||
|
|
Loading…
Reference in a new issue