From 637b6557fbe7ec58f24d6354f57a54e1c366da4f Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 31 Mar 2009 08:43:12 +0000 Subject: [PATCH] "- symlinkCache_resolve failed on other mounted dir (eg. from the filesystem stream-wrapper), as it removed the scheme --> now done only for vfs scheme - quitened readlink to not complain if backend does not support links" --- phpgwapi/inc/class.vfs_stream_wrapper.inc.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/phpgwapi/inc/class.vfs_stream_wrapper.inc.php b/phpgwapi/inc/class.vfs_stream_wrapper.inc.php index f4adc9dbb2..c38904cddb 100644 --- a/phpgwapi/inc/class.vfs_stream_wrapper.inc.php +++ b/phpgwapi/inc/class.vfs_stream_wrapper.inc.php @@ -560,7 +560,7 @@ class vfs_stream_wrapper implements iface_stream_wrapper */ static function readlink($path) { - return self::_call_on_backend('readlink',array($path)); + return self::_call_on_backend('readlink',array($path),true); // true = fail silent, if backend does not support readlink } /** @@ -858,7 +858,11 @@ class vfs_stream_wrapper implements iface_stream_wrapper */ static protected function symlinkCache_resolve($path,$do_symlink=true) { - if ($path[0] != '/') $path = parse_url($path,PHP_URL_PATH); + // remove vfs scheme, but no other schemes (eg. filesystem!) + if ($path[0] != '/' && parse_url($path,PHP_URL_SCHEME) == self::SCHEME) + { + $path = parse_url($path,PHP_URL_PATH); + } $strlen_path = strlen($path); foreach(self::$symlink_cache as $p => $t)