dont send to much when scanning large folders
This commit is contained in:
parent
9d2f8aa717
commit
ebc7a6a0a6
|
@ -490,15 +490,14 @@ class OC_FileCache{
|
||||||
}else{
|
}else{
|
||||||
$totalSize+=self::scanFile($file,$root);
|
$totalSize+=self::scanFile($file,$root);
|
||||||
$count++;
|
$count++;
|
||||||
if($count>$lastSend+25){
|
if($count>$lastSend+25 and $eventSource){
|
||||||
if($eventSource){
|
$lastSend=$count;
|
||||||
$eventSource->send('scanning',array('file'=>$path,'count'=>$count));
|
$eventSource->send('scanning',array('file'=>$path,'count'=>$count));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
self::increaseSize($view->getRoot().$path,$totalSize);
|
self::increaseSize($view->getRoot().$path,$totalSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue