diff options
author | Christian Kamm <mail@ckamm.de> | 2019-02-13 16:18:54 +0300 |
---|---|---|
committer | ckamm <mail@ckamm.de> | 2019-02-14 12:57:09 +0300 |
commit | a627f373b1254c081535fc7ecbcdeb7f6ea3708d (patch) | |
tree | 24e9e8e414676f6649e146f7cb1d7cdfc889be06 /src/gui/folder.cpp | |
parent | cf4ffd8c7e1d922848ad1e75d1b568e0e714a024 (diff) |
Ensure local discovery on selective sync changesloai_docs
As far as I'm aware local discovery can be skipped on folders that are
selective-sync blacklisted, so a local discovery is required when an
entry is removed from the blacklist.
Also rename
avoidReadFromDbOnNextSync() -> schedulePathForRemoteDiscovery()
since the old name might also imply it's not read from db in the local
discovery - which is not the case. Use Folder::
schedulePathForLocalDiscovery() for that.
Diffstat (limited to 'src/gui/folder.cpp')
-rw-r--r-- | src/gui/folder.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gui/folder.cpp b/src/gui/folder.cpp index 2bde6516e..f10641b1a 100644 --- a/src/gui/folder.cpp +++ b/src/gui/folder.cpp @@ -590,8 +590,9 @@ void Folder::downloadVirtualFile(const QString &_relativepath) if (record._type == ItemTypeVirtualFile) { record._type = ItemTypeVirtualFileDownload; _journal.setFileRecord(record); - // Make sure we go over that file during the discovery - _journal.avoidReadFromDbOnNextSync(relativepath); + // Make sure we go over that file during the discovery even if + // no actual remote discovery would be necessary + _journal.schedulePathForRemoteDiscovery(relativepath); } else if (record._type == ItemTypeDirectory || relativepath.isEmpty()) { _journal.markVirtualFileForDownloadRecursively(relativepath); } else { @@ -1127,6 +1128,11 @@ void Folder::slotNextSyncFullLocalDiscovery() _timeSinceLastFullLocalDiscovery.invalidate(); } +void Folder::schedulePathForLocalDiscovery(const QString &relativePath) +{ + _localDiscoveryTracker->addTouchedPath(relativePath.toUtf8()); +} + void Folder::slotFolderConflicts(const QString &folder, const QStringList &conflictPaths) { if (folder != _definition.alias) |