summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/files_external/lib/webdav.php8
1 files changed, 3 insertions, 5 deletions
diff --git a/apps/files_external/lib/webdav.php b/apps/files_external/lib/webdav.php
index 9ee7f555285..5857c59dcfc 100644
--- a/apps/files_external/lib/webdav.php
+++ b/apps/files_external/lib/webdav.php
@@ -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) {