Skip to content

Commit

Permalink
Do not error on NotFoundException
Browse files Browse the repository at this point in the history
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
  • Loading branch information
rullzer committed Aug 23, 2016
1 parent a0c2342 commit 8e9e7f1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions apps/files_sharing/lib/sharedstorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
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;

Expand Down Expand Up @@ -94,6 +95,9 @@ private function init() {
$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 = '';
Expand Down

0 comments on commit 8e9e7f1

Please sign in to comment.