Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Return proper watcher if SharedStorage originates from ExternalMount
  • Loading branch information
skjnldsv authored Sep 10, 2021
commit 71c2456e3a9677043509916c1ea53548f3b4e67e
15 changes: 14 additions & 1 deletion apps/files_sharing/lib/SharedStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,20 @@ public function getOwner($path) {
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();
}
Expand Down