diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php index e5476c77b2a1a..43348cf63fdb2 100644 --- a/lib/private/Files/View.php +++ b/lib/private/Files/View.php @@ -1525,7 +1525,7 @@ public function getDirectoryContent($directory, $mimetype_filter = '', \OCP\File $rootEntry['path'] = substr(Filesystem::normalizePath($path . '/' . $rootEntry['name']), strlen($user) + 2); // full path without /$user/ // if sharing was disabled for the user we remove the share permissions - if (\OCP\Util::isSharingDisabledForUser()) { + if ($sharingDisabled) { $rootEntry['permissions'] = $rootEntry['permissions'] & ~\OCP\Constants::PERMISSION_SHARE; }