Signed-off-by: Robin Appelman <robin@icewind.nl>
} 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);
$nodes = $userFolder->getById($this->fileId);
if (empty($nodes)) {
- throw new NotFoundException();
+ throw new NotFoundException('Node for share not found, fileid: ' . $this->fileId);
}
$this->node = $nodes[0];