Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/desktop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/folder.cpp')
-rw-r--r--src/gui/folder.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gui/folder.cpp b/src/gui/folder.cpp
index 56f2b302d..01a3c7b84 100644
--- a/src/gui/folder.cpp
+++ b/src/gui/folder.cpp
@@ -643,9 +643,13 @@ void Folder::startSync(const QStringList &pathList)
}
return interval;
}();
- if (_folderWatcher && _folderWatcher->isReliable() && _timeSinceLastFullLocalDiscovery.isValid()
- && (fullLocalDiscoveryInterval.count() < 0
- || _timeSinceLastFullLocalDiscovery.hasExpired(fullLocalDiscoveryInterval.count()))) {
+ bool hasDoneFullLocalDiscovery = _timeSinceLastFullLocalDiscovery.isValid();
+ bool periodicFullLocalDiscoveryNow =
+ fullLocalDiscoveryInterval.count() >= 0 // negative means we don't require periodic full runs
+ && _timeSinceLastFullLocalDiscovery.hasExpired(fullLocalDiscoveryInterval.count());
+ if (_folderWatcher && _folderWatcher->isReliable()
+ && hasDoneFullLocalDiscovery
+ && !periodicFullLocalDiscoveryNow) {
qCInfo(lcFolder) << "Allowing local discovery to read from the database";
_engine->setLocalDiscoveryOptions(LocalDiscoveryStyle::DatabaseAndFilesystem, _localDiscoveryPaths);