handle errors while getting fileinfo

This commit is contained in:
Robin Appelman 2016-07-05 23:19:30 +02:00 committed by Lukas Reschke
parent 4de7476f58
commit 039f730700
No known key found for this signature in database
GPG Key ID: B9F6980CF6E759B1
1 changed files with 1 additions and 1 deletions

View File

@ -71,7 +71,7 @@ $shareManager = \OC::$server->getShareManager();
$share = $shareManager->getShareByToken($token);
$sharePermissions= (int)$share->getPermissions();
if(!($share->getPermissions() & \OCP\Constants::PERMISSION_READ)) {
if($rootInfo === false || !($share->getPermissions() & \OCP\Constants::PERMISSION_READ)) {
OCP\JSON::error(array('data' => 'Share is not readable.'));
exit();
}