diff options
Diffstat (limited to 'apps/files_sharing/lib_share.php')
-rw-r--r-- | apps/files_sharing/lib_share.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/files_sharing/lib_share.php b/apps/files_sharing/lib_share.php index 6bb36615b18..e64fed6f640 100644 --- a/apps/files_sharing/lib_share.php +++ b/apps/files_sharing/lib_share.php @@ -88,10 +88,10 @@ class OC_SHARE { return $result[0]['source']; } else { // Check if the directory above this target is shared - $parentDir = substr($target, 0, strrpos($target, "/")); + $parentDir = dirname($target); if ($parentDir) { $result = OC_SHARE::getSource($parentDir); - return $result.substr($target, strrpos($target, "/")); + return $result."/".basename($target); } else { return false; } |