summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-03-31 16:28:22 +0200
committerRobin Appelman <icewind@owncloud.com>2012-03-31 16:28:22 +0200
commitebc7a6a0a6249213122bf97104f850d2ce6b7c1a (patch)
tree6123f62430efbebc1b361b5ec4b18b9a6691dc20
parent9d2f8aa717826c1db8f8ec5f49a4128af3651edb (diff)
downloadnextcloud-server-ebc7a6a0a6249213122bf97104f850d2ce6b7c1a.tar.gz
nextcloud-server-ebc7a6a0a6249213122bf97104f850d2ce6b7c1a.zip
dont send to much when scanning large folders
-rw-r--r--lib/filecache.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/filecache.php b/lib/filecache.php
index 59b0fb1b503..4a4183cbdb5 100644
--- a/lib/filecache.php
+++ b/lib/filecache.php
@@ -490,10 +490,9 @@ class OC_FileCache{
}else{
$totalSize+=self::scanFile($file,$root);
$count++;
- if($count>$lastSend+25){
- if($eventSource){
- $eventSource->send('scanning',array('file'=>$path,'count'=>$count));
- }
+ if($count>$lastSend+25 and $eventSource){
+ $lastSend=$count;
+ $eventSource->send('scanning',array('file'=>$path,'count'=>$count));
}
}
}