Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2021-09-10 16:27:39 +0300
committerGitHub <noreply@github.com>2021-09-10 16:27:39 +0300
commita79ffaba4849e2025bd08075adf00cfbbe3f6315 (patch)
tree7dea6fae94203784bd9ef6d9885f686aeeab8ddc /apps/files_sharing/lib
parente71ce6f6598530506ad606cd22abae01ea861fca (diff)
Return proper watcher if SharedStorage originates from ExternalMount
Diffstat (limited to 'apps/files_sharing/lib')
-rw-r--r--apps/files_sharing/lib/SharedStorage.php15
1 files changed, 14 insertions, 1 deletions
diff --git a/apps/files_sharing/lib/SharedStorage.php b/apps/files_sharing/lib/SharedStorage.php
index c06c750dc17..127fcbbccbc 100644
--- a/apps/files_sharing/lib/SharedStorage.php
+++ b/apps/files_sharing/lib/SharedStorage.php
@@ -401,7 +401,20 @@ class SharedStorage extends \OC\Files\Storage\Wrapper\Jail implements ISharedSto
return $this->superShare->getShareOwner();
}
- public function getWatcher($path = '', $storage = null) {
+ public function getWatcher($path = '', $storage = null): Watcher {
+ $mountManager = \OC::$server->getMountManager();
+
+ // Get node informations
+ $node = $this->getShare()->getNodeCacheEntry();
+ if ($node) {
+ $mount = $mountManager->findByNumericId($node->getStorageId());
+ // If the share is originating from an external storage
+ if (count($mount) > 0 && $mount[0] instanceof ExternalMountPoint) {
+ // Propagate original storage scan
+ return parent::getWatcher($path, $storage);
+ }
+ }
+
// cache updating is handled by the share source
return new NullWatcher();
}