summaryrefslogtreecommitdiffstats
path: root/lib/filecache.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/filecache.php')
-rw-r--r--lib/filecache.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/filecache.php b/lib/filecache.php
index 732160c216a..e94ae49c73a 100644
--- a/lib/filecache.php
+++ b/lib/filecache.php
@@ -323,10 +323,11 @@ class OC_FileCache{
$path=$params['path'];
$fullPath=$view->getRoot().$path;
$mimetype=$view->getMimeType($path);
+ $dir=$view->is_dir($path.'/');
//dont use self::get here, we don't want inifinte loops when a file has changed
$cachedSize=self::getCachedSize($path,$root);
$size=0;
- if($mimetype=='httpd/unix-directory'){
+ if($dir){
if(self::inCache($path,$root)){
$parent=self::getFileId($fullPath);
$query=OC_DB::prepare('SELECT size FROM *PREFIX*fscache WHERE parent=?');
@@ -465,13 +466,13 @@ class OC_FileCache{
$view=new OC_FilesystemView(($root=='/')?'':$root);
}
self::scanFile($path,$root);
- $dh=$view->opendir($path);
+ $dh=$view->opendir($path.'/');
$totalSize=0;
if($dh){
while (($filename = readdir($dh)) !== false) {
if($filename != '.' and $filename != '..'){
$file=$path.'/'.$filename;
- if($view->is_dir($file)){
+ if($view->is_dir($file.'/')){
if($eventSource){
$eventSource->send('scanning',array('file'=>$file,'count'=>$count));
}