File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change 3434
3535use OC \Files \Cache \FailedCache ;
3636use OC \Files \Cache \NullWatcher ;
37+ use OC \Files \Cache \Watcher ;
3738use OC \Files \Filesystem ;
3839use OC \Files \Storage \FailedStorage ;
3940use OC \Files \Storage \Wrapper \PermissionsMask ;
4041use OC \User \NoUserException ;
42+ use OCA \Files_External \Config \ExternalMountPoint ;
4143use OCP \Constants ;
4244use OCP \Files \Cache \ICacheEntry ;
4345use OCP \Files \NotFoundException ;
@@ -405,7 +407,20 @@ public function getOwner($path): string {
405407 return $ this ->superShare ->getShareOwner ();
406408 }
407409
408- public function getWatcher ($ path = '' , $ storage = null ): NullWatcher {
410+ public function getWatcher ($ path = '' , $ storage = null ): Watcher {
411+ $ mountManager = \OC ::$ server ->getMountManager ();
412+
413+ // Get node informations
414+ $ node = $ this ->getShare ()->getNodeCacheEntry ();
415+ if ($ node ) {
416+ $ mount = $ mountManager ->findByNumericId ($ node ->getStorageId ());
417+ // If the share is originating from an external storage
418+ if (count ($ mount ) > 0 && $ mount [0 ] instanceof ExternalMountPoint) {
419+ // Propagate original storage scan
420+ return parent ::getWatcher ($ path , $ storage );
421+ }
422+ }
423+
409424 // cache updating is handled by the share source
410425 return new NullWatcher ();
411426 }
You can’t perform that action at this time.
0 commit comments