summaryrefslogtreecommitdiffstats
path: root/lib/private/Share20/Manager.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Share20/Manager.php')
-rw-r--r--lib/private/Share20/Manager.php4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php
index 86b34a4b9f0..3d7a274e662 100644
--- a/lib/private/Share20/Manager.php
+++ b/lib/private/Share20/Manager.php
@@ -277,12 +277,10 @@ class Manager implements IManager {
// And you can't share your rootfolder
if ($this->userManager->userExists($share->getSharedBy())) {
$userFolder = $this->rootFolder->getUserFolder($share->getSharedBy());
- $userFolderPath = $userFolder->getPath();
} else {
$userFolder = $this->rootFolder->getUserFolder($share->getShareOwner());
- $userFolderPath = $userFolder->getPath();
}
- if ($userFolderPath === $share->getNode()->getPath()) {
+ if ($userFolder->getId() === $share->getNode()->getId()) {
throw new \InvalidArgumentException('You can’t share your root folder');
}