ソースを参照

Always unlock node after trying to create a share

Signed-off-by: Robin Appelman <robin@icewind.nl>
tags/v11.0RC2
Robin Appelman 7年前
コミット
37eded7e7c
コミッターのメールアドレスに関連付けられたアカウントが存在しません
2個のファイルの変更4行の追加2行の削除
  1. 3
    1
      apps/files_sharing/lib/API/Share20OCS.php
  2. 1
    1
      lib/private/Share20/Share.php

+ 3
- 1
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);

+ 1
- 1
lib/private/Share20/Share.php ファイルの表示

@@ -160,7 +160,7 @@ class Share implements \OCP\Share\IShare {

$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];

読み込み中…
キャンセル
保存