mirror of
https://github.com/DirectoryLister/DirectoryLister.git
synced 2025-08-26 15:25:18 +02:00
Fixed parent dir links on Windows
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user