as we now always set the default context / user, we have to use check_set_context($url, $always_set=true)

This commit is contained in:
Ralf Becker 2020-09-19 13:49:24 +02:00
parent 5ccb26d646
commit 20c5dde04c
2 changed files with 2 additions and 5 deletions

View File

@ -1147,10 +1147,7 @@ class StreamWrapper extends Api\Db\Pdo implements Vfs\StreamWrapperIface
$path = Vfs::parse_url($url,PHP_URL_PATH);
if (!$this->context)
{
$this->check_set_context($url);
}
$this->check_set_context($url, true);
// webdav adds a trailing slash to dirs, which causes url_stat to NOT find the file otherwise
if ($path != '/' && substr($path,-1) == '/')

View File

@ -693,7 +693,7 @@ class StreamWrapper extends Base implements StreamWrapperIface
function url_stat ( $path, $flags, $try_create_home=false, $check_symlink_components=true, $check_symlink_depth=self::MAX_SYMLINK_DEPTH, $try_reconnect=true )
{
// we have no context, but $path is a URL with a valid user --> set it
$this->check_set_context($path);
$this->check_set_context($path, true);
if (!($url = static::resolve_url($path,!($flags & STREAM_URL_STAT_LINK), $check_symlink_components)))
{