summaryrefslogtreecommitdiffstats
path: root/apps/files/lib/Command/TransferOwnership.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files/lib/Command/TransferOwnership.php')
-rw-r--r--apps/files/lib/Command/TransferOwnership.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/files/lib/Command/TransferOwnership.php b/apps/files/lib/Command/TransferOwnership.php
index d175f66d171..6113f6df54c 100644
--- a/apps/files/lib/Command/TransferOwnership.php
+++ b/apps/files/lib/Command/TransferOwnership.php
@@ -263,7 +263,8 @@ class TransferOwnership extends Command {
foreach($this->shares as $share) {
try {
- if ($share->getSharedWith() === $this->destinationUser) {
+ if ($share->getShareType() === \OCP\Share::SHARE_TYPE_USER &&
+ $share->getSharedWith() === $this->destinationUser) {
// Unmount the shares before deleting, so we don't try to get the storage later on.
$shareMountPoint = $this->mountManager->find('/' . $this->destinationUser . '/files' . $share->getTarget());
if ($shareMountPoint) {