From 9a2d04720a5e644041cbbf1ef1badbc88b663bd8 Mon Sep 17 00:00:00 2001 From: Kevin Ottens Date: Tue, 30 Jun 2020 14:19:55 +0200 Subject: [PATCH] Also use mangled paths when looking for entries below a path Otherwise on second sync we wouldn't find anything under a mangled path and just end up thinking said files were removed. Signed-off-by: Kevin Ottens --- src/common/syncjournaldb.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/common/syncjournaldb.cpp b/src/common/syncjournaldb.cpp index 43b0b045c..df3360879 100644 --- a/src/common/syncjournaldb.cpp +++ b/src/common/syncjournaldb.cpp @@ -1098,6 +1098,7 @@ bool SyncJournalDb::getFilesBelowPath(const QByteArray &path, const std::functio if (!_getFilesBelowPathQuery.initOrReset(QByteArrayLiteral( GET_FILE_RECORD_QUERY " WHERE " IS_PREFIX_PATH_OF("?1", "path") + " OR " IS_PREFIX_PATH_OF("?1", "e2eMangledName") // We want to ensure that the contents of a directory are sorted // directly behind the directory itself. Without this ORDER BY // an ordering like foo, foo-2, foo/file would be returned. -- 2.30.2