From 6e47661afdc4e980bd43924ae0871c4f650209f4 Mon Sep 17 00:00:00 2001 From: Robin McCorkell Date: Tue, 18 Aug 2015 13:41:47 +0100 Subject: [PATCH] Fix extracting basename from path in sharing --- apps/files_sharing/lib/share/folder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/files_sharing/lib/share/folder.php b/apps/files_sharing/lib/share/folder.php index e18839b577..ef42393f58 100644 --- a/apps/files_sharing/lib/share/folder.php +++ b/apps/files_sharing/lib/share/folder.php @@ -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;