From 20c5dde04c75c0766fd5227ab5ac4838f5f17d3f Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sat, 19 Sep 2020 13:49:24 +0200 Subject: [PATCH] as we now always set the default context / user, we have to use check_set_context($url, $always_set=true) --- api/src/Vfs/Sqlfs/StreamWrapper.php | 5 +---- api/src/Vfs/StreamWrapper.php | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/api/src/Vfs/Sqlfs/StreamWrapper.php b/api/src/Vfs/Sqlfs/StreamWrapper.php index 4da8d2872f..9846957a14 100644 --- a/api/src/Vfs/Sqlfs/StreamWrapper.php +++ b/api/src/Vfs/Sqlfs/StreamWrapper.php @@ -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) == '/') diff --git a/api/src/Vfs/StreamWrapper.php b/api/src/Vfs/StreamWrapper.php index cc382ea92f..48c8db81a2 100644 --- a/api/src/Vfs/StreamWrapper.php +++ b/api/src/Vfs/StreamWrapper.php @@ -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))) {