summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-08-18 16:22:02 +0200
committerMorris Jobke <hey@morrisjobke.de>2015-08-18 16:22:02 +0200
commit08aaa334ccfc0814e404a46b85b8d667ad836284 (patch)
treea46a79c540efc70e6f79fb9a6a853e0cfba741fd
parentd96afe956ef706357486a5dfeef6551813293677 (diff)
parent6e47661afdc4e980bd43924ae0871c4f650209f4 (diff)
downloadnextcloud-server-08aaa334ccfc0814e404a46b85b8d667ad836284.tar.gz
nextcloud-server-08aaa334ccfc0814e404a46b85b8d667ad836284.zip
Merge pull request #18389 from owncloud/fix-17770
Fix extracting basename from path in sharing
-rw-r--r--apps/files_sharing/lib/share/folder.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/files_sharing/lib/share/folder.php b/apps/files_sharing/lib/share/folder.php
index e18839b577d..ef42393f58d 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;