summaryrefslogtreecommitdiffstats
path: root/lib/filecache.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-02-06 19:33:37 +0100
committerRobin Appelman <icewind@owncloud.com>2012-02-06 19:33:37 +0100
commite50dfbc2284e170b37735880d0a8694b89234400 (patch)
treed47cb7a661ac5e079f93fc657d0cbc4787e81f9f /lib/filecache.php
parent9f3388ecbc7f7269a1df36d22242089f3be731ad (diff)
downloadnextcloud-server-e50dfbc2284e170b37735880d0a8694b89234400.tar.gz
nextcloud-server-e50dfbc2284e170b37735880d0a8694b89234400.zip
fix filecache when creating a new folder
Diffstat (limited to 'lib/filecache.php')
-rw-r--r--lib/filecache.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/filecache.php b/lib/filecache.php
index e3f7fedeecf..964099c7fcd 100644
--- a/lib/filecache.php
+++ b/lib/filecache.php
@@ -298,9 +298,9 @@ class OC_FileCache{
$mimetype=$view->getMimeType($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(self::inCache($path,$root)){
- $size=0;
$parent=self::getFileId($fullPath);
$query=OC_DB::prepare('SELECT size FROM *PREFIX*fscache WHERE parent=?');
$query->execute(array($parent));
@@ -312,7 +312,8 @@ class OC_FileCache{
$writable=$view->is_writable($path);
self::put($path,array('size'=>$size,'mtime'=>$mtime,'ctime'=>$ctime,'mimetype'=>$mimetype,'writable'=>$writable));
}else{
- self::scan($path,null,0,$root);
+ $count=0;
+ self::scan($path,null,$count,$root);
}
}else{
$size=self::scanFile($path,$root);