diff --git a/lib/filecache.php b/lib/filecache.php index 7bf98f43a370dcb162b9506534c591e7d7729071..a02751b08d9e98fd1da5d649e4ff50c540bd40d0 100644 --- a/lib/filecache.php +++ b/lib/filecache.php @@ -362,10 +362,10 @@ class OC_FileCache{ while($id!=-1) {//walk up the filetree increasing the size of all parent folders $query=OC_DB::prepare('UPDATE `*PREFIX*fscache` SET `size`=`size`+? WHERE `id`=?'); $query->execute(array($sizeDiff, $id)); + $path=dirname($path); if($path == '' or $path =='/'){ return; } - $path=dirname($path); $parent = OC_FileCache_Cached::get($path); $id = $parent['id']; //stop walking up the filetree if we hit a non-folder