Permalink
Browse files

MDL-35379 Repository: WebDAV supports / as a path

  • Loading branch information...
Simon Coggins authored and FMCorz committed Sep 14, 2012
1 parent f9a8571 commit 28f6aa743fe0ce97e611425ae45b75ab8a056408
Showing with 7 additions and 3 deletions.
  1. +7 −3 repository/webdav/lib.php
View
@@ -157,10 +157,14 @@ public function get_listing($path='', $page = '') {
'path'=>$v['href']
);
}
}else{
// a file
} else {
// A file.
$path = rtrim($path,'/');
$title = urldecode(substr($v['href'], strpos($v['href'], $path)+strlen($path)));
if (empty($path)) {
$title = urldecode($v['href']);
} else {
$title = urldecode(substr($v['href'], strpos($v['href'], $path) + strlen($path)));
}
$title = basename($title);
$size = !empty($v['getcontentlength'])? $v['getcontentlength']:'';
$files[strtoupper($title)] = array(

0 comments on commit 28f6aa7

Please sign in to comment.