mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 14:41:29 +01:00
"fixed not working egw_vfs::dirname if result should be '/', eg. egw_vfs::dirname('/home)"
This commit is contained in:
parent
823a3ab4c0
commit
9e34658599
@ -977,12 +977,13 @@ class egw_vfs extends vfs_stream_wrapper
|
|||||||
{
|
{
|
||||||
if ($url == '/' || $url[0] != '/' && parse_url($url,PHP_URL_PATH) == '/')
|
if ($url == '/' || $url[0] != '/' && parse_url($url,PHP_URL_PATH) == '/')
|
||||||
{
|
{
|
||||||
|
//error_log(__METHOD__."($url) returning FALSE: already in root!");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$parts = explode('/',$url);
|
$parts = explode('/',$url);
|
||||||
if (substr($url,-1) == '/') array_pop($parts);
|
if (substr($url,-1) == '/') array_pop($parts);
|
||||||
array_pop($parts);
|
array_pop($parts);
|
||||||
if ($url[0] != '/' && count($parts) == 3)
|
if ($url[0] != '/' && count($parts) == 3 || count($parts) == 1 && $parts[0] === '')
|
||||||
{
|
{
|
||||||
array_push($parts,''); // scheme://host is wrong (no path), has to be scheme://host/
|
array_push($parts,''); // scheme://host is wrong (no path), has to be scheme://host/
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user