summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2016-07-20 14:24:22 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2016-08-05 14:17:32 +0200
commit0556e40d3e560695f4aee5f9ef194355f1573e0f (patch)
tree4414ce97b7b5b457d5e1d730cbaab7e3c662de89 /apps/files_sharing/lib
parentd9418c105e66028d1399b43bad3c1e0122c2aa25 (diff)
downloadnextcloud-server-0556e40d3e560695f4aee5f9ef194355f1573e0f.tar.gz
nextcloud-server-0556e40d3e560695f4aee5f9ef194355f1573e0f.zip
Fix tests
Diffstat (limited to 'apps/files_sharing/lib')
-rw-r--r--apps/files_sharing/lib/API/Share20OCS.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/files_sharing/lib/API/Share20OCS.php b/apps/files_sharing/lib/API/Share20OCS.php
index 7dee1c7b67c..0cce05c3b17 100644
--- a/apps/files_sharing/lib/API/Share20OCS.php
+++ b/apps/files_sharing/lib/API/Share20OCS.php
@@ -493,7 +493,7 @@ class Share20OCS extends OCSController {
$userFolder = $this->rootFolder->getUserFolder($this->currentUser->getUID());
try {
$path = $userFolder->get($path);
- $path->lock(ILockingProvider::LOCK_SHARED);
+ $this->lock($path);
} catch (\OCP\Files\NotFoundException $e) {
throw new OCSNotFoundException($this->l->t('Wrong path, file/folder doesn\'t exist'));
} catch (LockedException $e) {
@@ -659,7 +659,7 @@ class Share20OCS extends OCSController {
}
if ($share->getPermissions() & ~$maxPermissions) {
- throw new OCSBadRequestException($this->l->t('Cannot increase permissions'));
+ throw new OCSNotFoundException($this->l->t('Cannot increase permissions'));
}
}
}