[Pkg-owncloud-commits] [php-sabredav] 01/15: Do not prepend / if the basepath is empty
David Prévot
taffit at moszumanska.debian.org
Tue Jan 5 03:11:49 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 c5be14025b1ada09a9e185c8d4381a79e7a0fc3e
Author: Roeland Jago Douma <roeland at famdouma.nl>
Date: Sun Oct 25 16:41:41 2015 +0100
Do not prepend / if the basepath is empty
This makes sure that in the root child entries are cached properly like
'A' instead of '/A' which is not expected in the function getNodeForPath
---
lib/DAV/Tree.php | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/DAV/Tree.php b/lib/DAV/Tree.php
index f030a19..f4c2f23 100644
--- a/lib/DAV/Tree.php
+++ b/lib/DAV/Tree.php
@@ -193,7 +193,8 @@ class Tree {
$node = $this->getNodeForPath($path);
$children = $node->getChildren();
- $basePath = trim($path,'/') . '/';
+ $basePath = trim($path,'/');
+ $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