mirror of
https://github.com/getgrav/grav.git
synced 2025-02-20 19:56:53 +01:00
Improved FileSystem::pathinfoInternal()
This commit is contained in:
parent
86cfba3bc9
commit
878de339e5
|
|
@ -239,12 +239,12 @@ class Filesystem implements FilesystemInterface
|
|||
|
||||
if (null !== $scheme) {
|
||||
$info['scheme'] = $scheme;
|
||||
$dirname = isset($info['dirname']) && $info['dirname'] !== '.' ? $info['dirname'] : null;
|
||||
$dirname = $info['dirname'] ?? '.';
|
||||
|
||||
if (null !== $dirname) {
|
||||
if ('' !== $dirname && '.' !== $dirname) {
|
||||
// In Windows dirname may be using backslashes, fix that.
|
||||
if (DIRECTORY_SEPARATOR !== '/') {
|
||||
$dirname = str_replace('\\', '/', $dirname);
|
||||
$dirname = str_replace(DIRECTORY_SEPARATOR, '/', $dirname);
|
||||
}
|
||||
|
||||
$info['dirname'] = $scheme . '://' . $dirname;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user