summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib/API/Share20OCS.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_sharing/lib/API/Share20OCS.php')
-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'));
}
}
}