From 17ba77d3692d56a61bf15047c7b242eced476262 Mon Sep 17 00:00:00 2001 From: nathangray Date: Mon, 30 Jul 2018 12:55:23 -0600 Subject: [PATCH] Make sure we get correct path when sharing from a share --- api/src/Vfs/Sharing.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/api/src/Vfs/Sharing.php b/api/src/Vfs/Sharing.php index d775dca0ef..6473b9a0ff 100644 --- a/api/src/Vfs/Sharing.php +++ b/api/src/Vfs/Sharing.php @@ -224,6 +224,13 @@ class Sharing extends \EGroupware\Api\Sharing if (($exists = ($stat = Vfs::stat($path)) && Vfs::check_access($path, Vfs::READABLE, $stat))) { + // Make sure we get the correct path if sharing from a share + if(isset($GLOBALS['egw']->sharing) && $exists) + { + $resolved_stat = Vfs::parse_url($stat['url']); + $path = 'vfs://default'. $resolved_stat['path']; + } + $vfs_path = $path; } }