mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-28 10:53:39 +01:00
backported Andreas r30212: Resolved problem with some directories that cannot be opened if they contain a symlink, due to a problem with vfs_stream_wrapper::check_symlink_components, which returned that a path doesn't have a symlink in it caused by to the vfs_stream_wrapper internal symlink_cache
This commit is contained in:
parent
2610b365c8
commit
297e1dbe76
@ -141,7 +141,7 @@ class vfs_stream_wrapper implements iface_stream_wrapper
|
||||
* @param boolean $do_symlink=true is a direct match allowed, default yes (must be false for a lstat or readlink!)
|
||||
* @return string|boolean false if the url cant be resolved, should not happen if fstab has a root entry
|
||||
*/
|
||||
static function resolve_url($path,$do_symlink=true)
|
||||
static function resolve_url($path,$do_symlink=true,$use_symlinkcache=true)
|
||||
{
|
||||
static $cache = array();
|
||||
|
||||
@ -154,7 +154,8 @@ class vfs_stream_wrapper implements iface_stream_wrapper
|
||||
return $cache[$path];
|
||||
}
|
||||
// check if we can already resolve path (or a part of it) with a known symlinks
|
||||
$path = self::symlinkCache_resolve($path,$do_symlink);
|
||||
if ($use_symlinkcache)
|
||||
$path = self::symlinkCache_resolve($path,$do_symlink);
|
||||
|
||||
// setting default user, passwd and domain, if it's not contained int the url
|
||||
static $defaults;
|
||||
@ -724,7 +725,7 @@ class vfs_stream_wrapper implements iface_stream_wrapper
|
||||
{
|
||||
if (self::LOG_LEVEL > 1) error_log(__METHOD__."('$path',$flags,try_create_home=$try_create_home,check_symlink_components=$check_symlink_components)");
|
||||
|
||||
if (!($url = self::resolve_url($path,!($flags & STREAM_URL_STAT_LINK))))
|
||||
if (!($url = self::resolve_url($path,!($flags & STREAM_URL_STAT_LINK), $check_symlink_components)))
|
||||
{
|
||||
if (self::LOG_LEVEL > 0) error_log(__METHOD__."('$path',$flags) can NOT resolve path!");
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user