aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-01-31 16:33:16 +0100
committerRobin Appelman <icewind@owncloud.com>2012-01-31 16:33:36 +0100
commitf1c5dce75c5f1bc2c9d7022a8b43577a3dec9629 (patch)
tree35dc7fc55c2ef4235c55e7d7578dfad06b0be126
parentc46f701771db9285e70a5b1d5a4b641046bf703c (diff)
downloadnextcloud-server-f1c5dce75c5f1bc2c9d7022a8b43577a3dec9629.tar.gz
nextcloud-server-f1c5dce75c5f1bc2c9d7022a8b43577a3dec9629.zip
dont try to use something that isn't there
-rw-r--r--files/ajax/scan.php6
-rw-r--r--lib/filecache.php4
2 files changed, 8 insertions, 2 deletions
diff --git a/files/ajax/scan.php b/files/ajax/scan.php
index 37ce7ab71f0..f7e75d5f8ba 100644
--- a/files/ajax/scan.php
+++ b/files/ajax/scan.php
@@ -22,6 +22,10 @@ if($force or !OC_FileCache::inCache('')){
exit;
}
}else{
- $eventSource->send('success',false);
+ if(isset($eventSource)){
+ $eventSource->send('success',false);
+ }else{
+ exit;
+ }
}
$eventSource->close(); \ No newline at end of file
diff --git a/lib/filecache.php b/lib/filecache.php
index 689680624a4..b4cafe8b311 100644
--- a/lib/filecache.php
+++ b/lib/filecache.php
@@ -325,7 +325,9 @@ class OC_FileCache{
$mimetype=OC_Filesystem::getMimeType($file);
$stat['mimetype']=$mimetype;
self::put($file,$stat);
- $eventSource->send('scanned',$file);
+ if($eventSource){
+ $eventSource->send('scanned',$file);
+ }
$totalSize+=$stat['size'];
}
}