From 600872a4bf695c93c5d9de787b35d02bce93a475 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Wed, 14 Mar 2018 18:58:20 +0100 Subject: [PATCH] An attempt to fix broken collabora sharing which originally got broken by commit f166fbdd4669d3c3e4a57e6bf14cb4e514af03e3 in order to get mounted template sharing fixed. --- api/src/Vfs/Sharing.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/api/src/Vfs/Sharing.php b/api/src/Vfs/Sharing.php index 4bbbcb0550..bc6b028564 100644 --- a/api/src/Vfs/Sharing.php +++ b/api/src/Vfs/Sharing.php @@ -456,7 +456,14 @@ class Sharing if (($exists = ($stat = Vfs::stat($path)) && Vfs::check_access($path, Vfs::READABLE, $stat))) { - $vfs_path = Vfs::parse_url($path, PHP_URL_PATH); + if (preg_match("/^(sqlfs|vfs)/", $stat['url'])) + { + $vfs_path = Vfs::parse_url($path, PHP_URL_PATH); + } + else + { + $vfs_path = Vfs::parse_url($stat['url'], PHP_URL_PATH); + } } } // check if file exists and is readable