From: Marco Michelino Date: Wed, 20 Apr 2011 11:28:35 +0000 (+0200) Subject: bugfixes on GET requests via WebDAV X-Git-Tag: v3.0~267^2~558^2~34^2~13 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=4e2ef271bc7b2e5ff2ea81ee5e4b1442cadd0e41;p=nextcloud-server.git bugfixes on GET requests via WebDAV --- diff --git a/lib/HTTP/WebDAV/Server/Filesystem.php b/lib/HTTP/WebDAV/Server/Filesystem.php index 49b2397175a..9cebee48d7c 100644 --- a/lib/HTTP/WebDAV/Server/Filesystem.php +++ b/lib/HTTP/WebDAV/Server/Filesystem.php @@ -297,12 +297,16 @@ while ($filename = readdir($handle)) { if ($filename != "." && $filename != "..") { - $fullpath = $fspath."/".$filename; + if( substr($fspath, -1) != '/' ){ + $fspath .= '/'; + } + $fullpath = $fspath.$filename; $name = htmlspecialchars($filename); + $uri = $_SERVER['SCRIPT_NAME'] . $fullpath; printf($format, - number_format(filesize($fullpath)), - strftime("%Y-%m-%d %H:%M:%S", filemtime($fullpath)), - "$name"); + number_format(OC_FILESYSTEM::filesize($fullpath)), + strftime("%Y-%m-%d %H:%M:%S", OC_FILESYSTEM::filemtime($fullpath)), + "$name"); } } @@ -745,4 +749,4 @@ VALUES (?,?,?,?,?,'timeout',?,?)"); } } -?> \ No newline at end of file +?>