dont try to use something that isn't there

This commit is contained in:
Robin Appelman 2012-01-31 16:33:16 +01:00
parent c46f701771
commit f1c5dce75c
2 changed files with 8 additions and 2 deletions

View File

@ -22,6 +22,10 @@ if($force or !OC_FileCache::inCache('')){
exit; exit;
} }
}else{ }else{
$eventSource->send('success',false); if(isset($eventSource)){
$eventSource->send('success',false);
}else{
exit;
}
} }
$eventSource->close(); $eventSource->close();

View File

@ -325,7 +325,9 @@ class OC_FileCache{
$mimetype=OC_Filesystem::getMimeType($file); $mimetype=OC_Filesystem::getMimeType($file);
$stat['mimetype']=$mimetype; $stat['mimetype']=$mimetype;
self::put($file,$stat); self::put($file,$stat);
$eventSource->send('scanned',$file); if($eventSource){
$eventSource->send('scanned',$file);
}
$totalSize+=$stat['size']; $totalSize+=$stat['size'];
} }
} }