Merge pull request #18389 from owncloud/fix-17770

Fix extracting basename from path in sharing
This commit is contained in:
Morris Jobke 2015-08-18 16:22:02 +02:00
commit 08aaa334cc

View file

@ -39,7 +39,7 @@ class OC_Share_Backend_Folder extends OC_Share_Backend_File implements OCP\Share
$shares = \OCP\Share::getItemSharedWithUser('folder', $parent, $shareWith, $owner);
if ($shares) {
foreach ($shares as $share) {
$name = substr($share['path'], strrpos($share['path'], '/') + 1);
$name = basename($share['path']);
$share['collection']['path'] = $name;
$share['collection']['item_type'] = 'folder';
$share['file_path'] = $name;