]> source.dussan.org Git - nextcloud-server.git/commitdiff
dont send to much when scanning large folders
authorRobin Appelman <icewind@owncloud.com>
Sat, 31 Mar 2012 14:28:22 +0000 (16:28 +0200)
committerRobin Appelman <icewind@owncloud.com>
Sat, 31 Mar 2012 14:28:22 +0000 (16:28 +0200)
lib/filecache.php

index 59b0fb1b503980ec72b11fb5a2bd321278c55cbb..4a4183cbdb5eef1f743c74218f57352d0502b2cf 100644 (file)
@@ -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));
                                                }
                                        }
                                }