summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2021-10-22 11:42:30 +0200
committerGitHub <noreply@github.com>2021-10-22 11:42:30 +0200
commit0a359376628b36256aa8332d79b1af1dfc513ce8 (patch)
treebc200632f14ebe2c6bfb4ec31dabee8c4fe1b49c /lib
parentaef40c7cf485c48c7c9e8af96c419264cc5c5a10 (diff)
parentd58d6199d980ce234b04aa2e892061d622507b5b (diff)
downloadnextcloud-server-0a359376628b36256aa8332d79b1af1dfc513ce8.tar.gz
nextcloud-server-0a359376628b36256aa8332d79b1af1dfc513ce8.zip
Merge pull request #26347 from J0WI/clean-path-regex
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Files/Filesystem.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/private/Files/Filesystem.php b/lib/private/Files/Filesystem.php
index 131c0780dce..a9b1b87c8e7 100644
--- a/lib/private/Files/Filesystem.php
+++ b/lib/private/Files/Filesystem.php
@@ -808,10 +808,10 @@ class Filesystem {
$path = '/' . $path;
$patterns = [
- '/\\\\/s', // no windows style slashes
- '/\/\.(\/\.)?\//s', // remove '/./'
- '/\/{2,}/s', // remove sequence of slashes
- '/\/\.$/s', // remove trailing /.
+ '#\\\\#s', // no windows style '\\' slashes
+ '#/\.(/\.)*/#s', // remove '/./'
+ '#\//+#s', // remove sequence of slashes
+ '#/\.$#s', // remove trailing '/.'
];
do {