Fixed path normalization to prevent dot dirs

Fixes #5945 where stat(.) would cause the backend OC to cache a dot dir
(only in older versions)
This commit is contained in:
Vincent Petry 2013-11-20 18:14:42 +01:00
parent a20c6049c3
commit 39cbdca429

View file

@ -323,11 +323,9 @@ class DAV extends \OC\Files\Storage\Common{
} }
public function cleanPath($path) { public function cleanPath($path) {
if ( ! $path || $path[0]=='/') { $path = \OC\Files\Filesystem::normalizePath($path);
return substr($path, 1); // remove leading slash
} else { return substr($path, 1);
return $path;
}
} }
private function simpleResponse($method, $path, $body, $expected) { private function simpleResponse($method, $path, $body, $expected) {