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:
parent
a20c6049c3
commit
39cbdca429
1 changed files with 3 additions and 5 deletions
|
@ -323,11 +323,9 @@ class DAV extends \OC\Files\Storage\Common{
|
|||
}
|
||||
|
||||
public function cleanPath($path) {
|
||||
if ( ! $path || $path[0]=='/') {
|
||||
return substr($path, 1);
|
||||
} else {
|
||||
return $path;
|
||||
}
|
||||
$path = \OC\Files\Filesystem::normalizePath($path);
|
||||
// remove leading slash
|
||||
return substr($path, 1);
|
||||
}
|
||||
|
||||
private function simpleResponse($method, $path, $body, $expected) {
|
||||
|
|
Loading…
Reference in a new issue