Commit 84b0404c authored by Sebastian Kummer's avatar Sebastian Kummer

Merge pull request #155 in ZP/z-push from feature/ZP-832-detect-folder-changes-faster to develop

* commit '0bddbc9b':
  ZP-832 Do comparing only if the folder already has a folder stat, but still get the newFolderStat even if the folder has none yet.
parents cc533ab9 0bddbc9b
...@@ -710,10 +710,10 @@ class Sync extends RequestProcessor { ...@@ -710,10 +710,10 @@ class Sync extends RequestProcessor {
} }
// compare the folder statistics if the backend supports this // compare the folder statistics if the backend supports this
if ($setupExporter && self::$backend->HasFolderStats() && $spa->HasFolderStat()) { if ($setupExporter && self::$backend->HasFolderStats()) {
// check if the folder stats changed -> if not, don't setup the exporter, there are no changes! // check if the folder stats changed -> if not, don't setup the exporter, there are no changes!
$newFolderStat = self::$backend->GetFolderStat(ZPush::GetAdditionalSyncFolderStore($spa->GetFolderId()), $spa->GetFolderId()); $newFolderStat = self::$backend->GetFolderStat(ZPush::GetAdditionalSyncFolderStore($spa->GetFolderId()), $spa->GetFolderId());
if ($newFolderStat === $spa->GetFolderStat()) { if ($spa->HasFolderStat() && $newFolderStat === $spa->GetFolderStat()) {
$changecount = 0; $changecount = 0;
$setupExporter = false; $setupExporter = false;
ZLog::Write(LOGLEVEL_DEBUG, "Sync(): Folder stat from the backend indicates that the folder did not change. Exporter will not run."); ZLog::Write(LOGLEVEL_DEBUG, "Sync(): Folder stat from the backend indicates that the folder did not change. Exporter will not run.");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment