@@ -1662,14 +1662,14 @@ void ProcessDirectoryJob::processFileFinalize(
1662
1662
}
1663
1663
}
1664
1664
1665
- if (_discoveryData->_syncOptions ._vfs &&
1665
+ if (_discoveryData->_syncOptions ._vfs && _discoveryData-> _syncOptions . _vfs -> mode () != OCC::Vfs::Off &&
1666
1666
(item->_type == CSyncEnums::ItemTypeFile || item->_type == CSyncEnums::ItemTypeDirectory) &&
1667
1667
item->_instruction == CSyncEnums::CSYNC_INSTRUCTION_NONE &&
1668
1668
!_discoveryData->_syncOptions ._vfs ->isPlaceHolderInSync (_discoveryData->_localDir + path._local )) {
1669
1669
item->_instruction = CSyncEnums::CSYNC_INSTRUCTION_UPDATE_VFS_METADATA;
1670
1670
}
1671
1671
1672
- if (_discoveryData->_syncOptions ._vfs &&
1672
+ if (_discoveryData->_syncOptions ._vfs && _discoveryData-> _syncOptions . _vfs -> mode () != OCC::Vfs::Off &&
1673
1673
(item->_type == CSyncEnums::ItemTypeFile || item->_type == CSyncEnums::ItemTypeDirectory) &&
1674
1674
item->_instruction == CSyncEnums::CSYNC_INSTRUCTION_NONE &&
1675
1675
FileSystem::isLnkFile ((_discoveryData->_localDir + path._local )) &&
@@ -1679,6 +1679,18 @@ void ProcessDirectoryJob::processFileFinalize(
1679
1679
item->_type = CSyncEnums::ItemTypeVirtualFileDehydration;
1680
1680
}
1681
1681
1682
+ if (item->_instruction != CSyncEnums::CSYNC_INSTRUCTION_NONE &&
1683
+ !item->isDirectory () &&
1684
+ _discoveryData->_syncOptions ._vfs &&
1685
+ _discoveryData->_syncOptions ._vfs ->mode () == OCC::Vfs::Off &&
1686
+ (item->_type == CSyncEnums::ItemTypeVirtualFile ||
1687
+ item->_type == CSyncEnums::ItemTypeVirtualFileDownload ||
1688
+ item->_type == CSyncEnums::ItemTypeVirtualFileDehydration)) {
1689
+ item->_instruction = CSyncEnums::CSYNC_INSTRUCTION_UPDATE_METADATA;
1690
+ item->_direction = SyncFileItem::Down;
1691
+ item->_type = CSyncEnums::ItemTypeFile;
1692
+ }
1693
+
1682
1694
if (path._original != path._target && (item->_instruction == CSYNC_INSTRUCTION_UPDATE_VFS_METADATA || item->_instruction == CSYNC_INSTRUCTION_UPDATE_METADATA || item->_instruction == CSYNC_INSTRUCTION_NONE)) {
1683
1695
ASSERT (_dirItem && _dirItem->_instruction == CSYNC_INSTRUCTION_RENAME);
1684
1696
// This is because otherwise subitems are not updated! (ideally renaming a directory could
@@ -1712,6 +1724,16 @@ void ProcessDirectoryJob::processFileFinalize(
1712
1724
} else {
1713
1725
recurse = false ;
1714
1726
}
1727
+
1728
+ if (!(item->isDirectory () ||
1729
+ (!_discoveryData->_syncOptions ._vfs || _discoveryData->_syncOptions ._vfs ->mode () != OCC::Vfs::Off) ||
1730
+ item->_type != CSyncEnums::ItemTypeVirtualFile ||
1731
+ item->_type != CSyncEnums::ItemTypeVirtualFileDownload ||
1732
+ item->_type != CSyncEnums::ItemTypeVirtualFileDehydration)) {
1733
+ qCCritical (lcDisco ()) << " wong item type for" << item->_file << item->_type ;
1734
+ Q_ASSERT (false );
1735
+ }
1736
+
1715
1737
if (recurse) {
1716
1738
auto job = new ProcessDirectoryJob (path, item, recurseQueryLocal, recurseQueryServer,
1717
1739
_lastSyncTimestamp, this );
0 commit comments