Skip to content

Commit 18b5582

Browse files
committed
add an assert to ensure we do not use virtual file types with no VFS
if VFS mode is off, we should nto be using any virtual file types Signed-off-by: Matthieu Gallien <[email protected]>
1 parent b8d9bd2 commit 18b5582

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/libsync/discovery.cpp

+10
Original file line numberDiff line numberDiff line change
@@ -1712,6 +1712,16 @@ void ProcessDirectoryJob::processFileFinalize(
17121712
} else {
17131713
recurse = false;
17141714
}
1715+
1716+
if (!(item->isDirectory() ||
1717+
(!_discoveryData->_syncOptions._vfs || _discoveryData->_syncOptions._vfs->mode() != OCC::Vfs::Off) ||
1718+
item->_type != CSyncEnums::ItemTypeVirtualFile ||
1719+
item->_type != CSyncEnums::ItemTypeVirtualFileDownload ||
1720+
item->_type != CSyncEnums::ItemTypeVirtualFileDehydration)) {
1721+
qCCritical(lcDisco()) << "wong item type for" << item->_file << item->_type;
1722+
Q_ASSERT(false);
1723+
}
1724+
17151725
if (recurse) {
17161726
auto job = new ProcessDirectoryJob(path, item, recurseQueryLocal, recurseQueryServer,
17171727
_lastSyncTimestamp, this);

0 commit comments

Comments
 (0)