diff options
Diffstat (limited to 'apps/files_sharing/lib/External/Storage.php')
-rw-r--r-- | apps/files_sharing/lib/External/Storage.php | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/apps/files_sharing/lib/External/Storage.php b/apps/files_sharing/lib/External/Storage.php index a12b9597dbd..ca99393a1e0 100644 --- a/apps/files_sharing/lib/External/Storage.php +++ b/apps/files_sharing/lib/External/Storage.php @@ -89,8 +89,17 @@ class Storage extends DAV implements ISharedStorage { 'user' => $options['token'], 'password' => (string)$options['password'] )); + } - $this->getWatcher()->setPolicy(\OC\Files\Cache\Watcher::CHECK_ONCE); + public function getWatcher($path = '', $storage = null) { + if (!$storage) { + $storage = $this; + } + if (!isset($this->watcher)) { + $this->watcher = new Watcher($storage); + $this->watcher->setPolicy(\OC\Files\Cache\Watcher::CHECK_ONCE); + } + return $this->watcher; } public function getRemoteUser() { |