aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/share
diff options
context:
space:
mode:
authoricewind1991 <robin@icewind.nl>2014-06-17 17:40:05 +0200
committericewind1991 <robin@icewind.nl>2014-06-17 17:40:05 +0200
commit8d1cf79152b16b11e8be3bc6cc57f5a9e72b04dd (patch)
treeef158aadc779e95845384783bbe668abed4c2d85 /lib/private/share
parentcce58368ad03f4ef3d8a1ad3e26e09fc51ca716a (diff)
parent07fdeba50b47848c995d38408635020e08cecb19 (diff)
downloadnextcloud-server-8d1cf79152b16b11e8be3bc6cc57f5a9e72b04dd.tar.gz
nextcloud-server-8d1cf79152b16b11e8be3bc6cc57f5a9e72b04dd.zip
Merge pull request #8399 from owncloud/server-server-sharing
Add server<->server sharing
Diffstat (limited to 'lib/private/share')
-rw-r--r--lib/private/share/share.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/share/share.php b/lib/private/share/share.php
index a3de8ebc0ef..26108a937ce 100644
--- a/lib/private/share/share.php
+++ b/lib/private/share/share.php
@@ -508,9 +508,9 @@ class Share extends \OC\Share\Constants {
if ($itemType === 'folder') {
$path = '/' . $uidOwner . '/files' . \OC\Files\Filesystem::getPath($itemSource) . '/';
$mountManager = \OC\Files\Filesystem::getMountManager();
- $mounts = $mountManager->getAll();
- foreach ($mounts as $mountPoint => $mount) {
- if ($mount->getStorage() instanceof \OC\Files\Storage\Shared && strpos($mountPoint, $path) === 0) {
+ $mounts = $mountManager->findIn($path);
+ foreach ($mounts as $mount) {
+ if ($mount->getStorage()->instanceOfStorage('\OCA\Files_Sharing\ISharedStorage')) {
$message = 'Sharing "' . $itemSourceName . '" failed, because it contains files shared with you!';
\OC_Log::write('OCP\Share', $message, \OC_Log::ERROR);
throw new \Exception($message);