[Pkg-owncloud-commits] [php-sabredav] 05/15: Fix caching of root-level nodes.

David Prévot taffit at moszumanska.debian.org
Tue Jan 5 03:11:50 UTC 2016


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch 2.1
in repository php-sabredav.

commit fce223bfd59bf0ff4c5769332230fb2a5e6ece21
Author: Evert Pot <me at evertpot.com>
Date:   Mon Oct 26 22:57:02 2015 -0400

    Fix caching of root-level nodes.
---
 lib/DAV/Tree.php | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/DAV/Tree.php b/lib/DAV/Tree.php
index f030a19..c440104 100644
--- a/lib/DAV/Tree.php
+++ b/lib/DAV/Tree.php
@@ -193,8 +193,10 @@ class Tree {
 
         $node = $this->getNodeForPath($path);
         $children = $node->getChildren();
-        $basePath = trim($path,'/') . '/';
-        foreach($children as $child) {
+        $basePath = trim($path, '/');
+        if ($basePath !== '') $basePath.='/';
+
+        foreach ($children as $child) {
 
             $this->cache[$basePath . $child->getName()] = $child;
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/php-sabredav.git



More information about the Pkg-owncloud-commits mailing list