From f0472fdd766bce33033f4eb2a6d6ac12a8364055 Mon Sep 17 00:00:00 2001 From: Matias Griese Date: Wed, 8 Apr 2015 21:37:19 +0300 Subject: [PATCH] Fix Folder::getRelativePath() so that it works with backslashes --- system/src/Grav/Common/Filesystem/Folder.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/src/Grav/Common/Filesystem/Folder.php b/system/src/Grav/Common/Filesystem/Folder.php index b30751e6a..3d30d12eb 100644 --- a/system/src/Grav/Common/Filesystem/Folder.php +++ b/system/src/Grav/Common/Filesystem/Folder.php @@ -72,8 +72,8 @@ abstract class Folder public static function getRelativePath($path, $base = GRAV_ROOT) { if ($base) { - $base = preg_replace('![\\|/]+!', '/', $base); - $path = preg_replace('![\\|/]+!', '/', $path); + $base = preg_replace('![\\\/]+!', '/', $base); + $path = preg_replace('![\\\/]+!', '/', $path); if (strpos($path, $base) === 0) { $path = ltrim(substr($path, strlen($base)), '/'); }