Skip to content

Commit 643f39e

Browse files
committed
Return proper watcher if SharedStorage originates from ExternalMount
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
1 parent 7f69a60 commit 643f39e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

apps/files_sharing/lib/SharedStorage.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,12 @@
3434

3535
use OC\Files\Cache\FailedCache;
3636
use OC\Files\Cache\NullWatcher;
37+
use OC\Files\Cache\Watcher;
3738
use OC\Files\Filesystem;
3839
use OC\Files\Storage\FailedStorage;
3940
use OC\Files\Storage\Wrapper\PermissionsMask;
4041
use OC\User\NoUserException;
42+
use OCA\Files_External\Config\ExternalMountPoint;
4143
use OCP\Constants;
4244
use OCP\Files\Cache\ICacheEntry;
4345
use OCP\Files\NotFoundException;
@@ -405,7 +407,11 @@ 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+
// If the share is originating from an external storage
412+
if ($this->getShare()->getNode()->getMountPoint() instanceof ExternalMountPoint) {
413+
return parent::getWatcher($path, $storage);
414+
}
409415
// cache updating is handled by the share source
410416
return new NullWatcher();
411417
}

0 commit comments

Comments
 (0)