aboutsummaryrefslogtreecommitdiffstats
path: root/lib/files/filesystem.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-10-26 12:37:49 +0200
committerRobin Appelman <icewind@owncloud.com>2012-10-26 12:37:49 +0200
commite63e246c4894aa7f72feb550d98747890838af0b (patch)
tree0a22b858800eb40e7a20f80818b30148badd8cb8 /lib/files/filesystem.php
parent39adadd3e3e50dcf3bf577a22870aaec52f63052 (diff)
downloadnextcloud-server-e63e246c4894aa7f72feb550d98747890838af0b.tar.gz
nextcloud-server-e63e246c4894aa7f72feb550d98747890838af0b.zip
fix problem with normalizePath when there was a double leading slash
Diffstat (limited to 'lib/files/filesystem.php')
-rw-r--r--lib/files/filesystem.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/files/filesystem.php b/lib/files/filesystem.php
index d735cf8626a..2b51131b20b 100644
--- a/lib/files/filesystem.php
+++ b/lib/files/filesystem.php
@@ -595,14 +595,14 @@ class Filesystem {
if ($path[0] !== '/') {
$path = '/' . $path;
}
-//remove trailing slash
- if ($stripTrailingSlash and strlen($path) > 1 and substr($path, -1, 1) === '/') {
- $path = substr($path, 0, -1);
- }
//remove duplicate slashes
while (strpos($path, '//') !== false) {
$path = str_replace('//', '/', $path);
}
+//remove trailing slash
+ if ($stripTrailingSlash and strlen($path) > 1 and substr($path, -1, 1) === '/') {
+ $path = substr($path, 0, -1);
+ }
//normalize unicode if possible
if (class_exists('Normalizer')) {
$path = \Normalizer::normalize($path);