summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib/propagation/recipientpropagator.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_sharing/lib/propagation/recipientpropagator.php')
-rw-r--r--apps/files_sharing/lib/propagation/recipientpropagator.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/apps/files_sharing/lib/propagation/recipientpropagator.php b/apps/files_sharing/lib/propagation/recipientpropagator.php
index 8e064e2ee54..f0941ce6cb7 100644
--- a/apps/files_sharing/lib/propagation/recipientpropagator.php
+++ b/apps/files_sharing/lib/propagation/recipientpropagator.php
@@ -25,6 +25,7 @@ namespace OCA\Files_Sharing\Propagation;
use OC\Files\Cache\ChangePropagator;
use OC\Files\View;
use OC\Share\Share;
+use OCP\Files\NotFoundException;
/**
* Propagate etags for share recipients
@@ -128,6 +129,9 @@ class RecipientPropagator {
protected $propagatingIds = [];
+ /**
+ * @param int $id
+ */
public function propagateById($id) {
if (isset($this->propagatingIds[$id])) {
return;
@@ -142,7 +146,13 @@ class RecipientPropagator {
if ($share['share_with'] === $this->userId) {
$user = $share['uid_owner'];
$view = new View('/' . $user . '/files');
- $path = $view->getPath($share['file_source']);
+
+ try {
+ $path = $view->getPath($share['file_source']);
+ } catch (NotFoundException $e) {
+ $path = null;
+ }
+
$watcher = new ChangeWatcher($view, $this->manager->getSharePropagator($user));
$watcher->writeHook(['path' => $path]);
}