From 4528bdabe7841a1a66027ac39f161a2bbeb0c1a1 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Tue, 23 Aug 2016 19:15:28 +0200 Subject: [PATCH] Do not error on NotFoundException Since this exception can be thrown when a shared file is in the trashbin there is no need to spam the log like crazy. Fixes #938 --- apps/files_sharing/lib/sharedstorage.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/files_sharing/lib/sharedstorage.php b/apps/files_sharing/lib/sharedstorage.php index 6dec020982..3ceca43042 100644 --- a/apps/files_sharing/lib/sharedstorage.php +++ b/apps/files_sharing/lib/sharedstorage.php @@ -36,6 +36,7 @@ use OC\Files\Cache\FailedCache; use OCA\Files_Sharing\ISharedStorage; use OCP\Constants; use OCP\Files\Cache\ICacheEntry; +use OCP\Files\NotFoundException; use OCP\Files\Storage\IStorage; use OCP\Lock\ILockingProvider; @@ -94,6 +95,9 @@ class Shared extends \OC\Files\Storage\Wrapper\Jail implements ISharedStorage { $sourcePath = $this->ownerView->getPath($this->superShare->getNodeId()); list($this->storage, $this->rootPath) = $this->ownerView->resolvePath($sourcePath); $this->sourceRootInfo = $this->storage->getCache()->get($this->rootPath); + } catch (NotFoundException $e) { + $this->storage = new FailedStorage(['exception' => $e]); + $this->rootPath = ''; } catch (\Exception $e) { $this->storage = new FailedStorage(['exception' => $e]); $this->rootPath = '';