From ad37a462fe303d30822b321abc9d6d63e2247243 Mon Sep 17 00:00:00 2001 From: Chris Kankiewicz Date: Wed, 26 Feb 2020 11:29:58 -0700 Subject: [PATCH] Fixed parent dir links on Windows --- app/src/ViewFunctions/ParentDir.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/ViewFunctions/ParentDir.php b/app/src/ViewFunctions/ParentDir.php index a9d3abc..7df37be 100644 --- a/app/src/ViewFunctions/ParentDir.php +++ b/app/src/ViewFunctions/ParentDir.php @@ -19,8 +19,8 @@ class ParentDir extends ViewFunction public function __invoke(string $path) { $parentDir = Collection::make( - explode('/', $path) - )->filter()->slice(0, -1)->implode('/'); + explode(DIRECTORY_SEPARATOR, $path) + )->filter()->slice(0, -1)->implode(DIRECTORY_SEPARATOR); return empty($parentDir) ? '.' : sprintf('?dir=%s', $parentDir); }