]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix more undefined indexes
authorBjörn Schießle <schiessle@owncloud.com>
Wed, 5 Dec 2012 11:58:32 +0000 (12:58 +0100)
committerBjörn Schießle <schiessle@owncloud.com>
Thu, 6 Dec 2012 14:58:05 +0000 (15:58 +0100)
lib/filecache.php

index 7bf98f43a370dcb162b9506534c591e7d7729071..a02751b08d9e98fd1da5d649e4ff50c540bd40d0 100644 (file)
@@ -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