mirror of
https://github.com/nextcloud/server.git
synced 2026-02-20 08:29:10 -05:00
Return proper watcher if SharedStorage originates from ExternalMount
This commit is contained in:
parent
e71ce6f659
commit
a79ffaba48
1 changed files with 14 additions and 1 deletions
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue