diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_sharing/lib/API/Share20OCS.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/files_sharing/lib/API/Share20OCS.php b/apps/files_sharing/lib/API/Share20OCS.php index 34f73c7ac07..5adfa640c00 100644 --- a/apps/files_sharing/lib/API/Share20OCS.php +++ b/apps/files_sharing/lib/API/Share20OCS.php @@ -402,8 +402,10 @@ class Share20OCS extends OCSController { } catch (GenericShareException $e) { $code = $e->getCode() === 0 ? 403 : $e->getCode(); throw new OCSException($e->getHint(), $code); - }catch (\Exception $e) { + } catch (\Exception $e) { throw new OCSForbiddenException($e->getMessage()); + } finally { + $share->getNode()->unlock(ILockingProvider::LOCK_SHARED); } $output = $this->formatShare($share); |