diff options
author | Robin Appelman <robin@icewind.nl> | 2016-09-20 11:29:12 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2016-10-12 16:12:29 +0200 |
commit | 37eded7e7cda2ab421b573d3b6d9165a4fb9dc9a (patch) | |
tree | 569301944ad35148e4a06ce5953367abd9103a9e /apps | |
parent | 0d842e0550a15b7b6c501dae2ec24a61b72ef8c9 (diff) | |
download | nextcloud-server-37eded7e7cda2ab421b573d3b6d9165a4fb9dc9a.tar.gz nextcloud-server-37eded7e7cda2ab421b573d3b6d9165a4fb9dc9a.zip |
Always unlock node after trying to create a share
Signed-off-by: Robin Appelman <robin@icewind.nl>
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); |