aboutsummaryrefslogtreecommitdiffstats
path: root/lib/filecache.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/filecache.php')
-rw-r--r--lib/filecache.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/filecache.php b/lib/filecache.php
index 928fc02e669..4e458ad929a 100644
--- a/lib/filecache.php
+++ b/lib/filecache.php
@@ -288,8 +288,9 @@ class OC_FileCache{
* recursively scan the filesystem and fill the cache
* @param string $path
* @param bool $onlyChilds
+ * @param OC_EventSource $enventSource
*/
- public static function scan($path,$onlyChilds=false){//PROBLEM due to the order things are added, all parents are -1
+ public static function scan($path,$onlyChilds,$eventSource){//PROBLEM due to the order things are added, all parents are -1
$dh=OC_Filesystem::opendir($path);
$stat=OC_Filesystem::stat($path);
$mimetype=OC_Filesystem::getMimeType($path);
@@ -305,12 +306,13 @@ class OC_FileCache{
if($filename != '.' and $filename != '..'){
$file=$path.'/'.$filename;
if(OC_Filesystem::is_dir($file)){
- self::scan($file,true);
+ self::scan($file,true,$eventSource);
}else{
$stat=OC_Filesystem::stat($file);
$mimetype=OC_Filesystem::getMimeType($file);
$stat['mimetype']=$mimetype;
self::put($file,$stat);
+ $eventSource->send('scanned',$file);
$totalSize+=$stat['size'];
}
}