diff options
author | Michael Gapczynski <mtgap@owncloud.com> | 2013-01-01 14:47:25 -0500 |
---|---|---|
committer | Michael Gapczynski <mtgap@owncloud.com> | 2013-01-01 14:47:25 -0500 |
commit | a1f7c28e28e221a6939a74eb5ae7b43c02a1d8e6 (patch) | |
tree | e9bafb610fb8ac7ab589200a3de9689f2c5f03d4 /apps/files_sharing/lib | |
parent | fe90130618e4ce9b1829b4ce8e87311a15f53b83 (diff) | |
download | nextcloud-server-a1f7c28e28e221a6939a74eb5ae7b43c02a1d8e6.tar.gz nextcloud-server-a1f7c28e28e221a6939a74eb5ae7b43c02a1d8e6.zip |
Use the source Scanner for shared storage when the path is specified
Diffstat (limited to 'apps/files_sharing/lib')
-rw-r--r-- | apps/files_sharing/lib/sharedstorage.php | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/apps/files_sharing/lib/sharedstorage.php b/apps/files_sharing/lib/sharedstorage.php index 8504a2d8944..3a5755c01fc 100644 --- a/apps/files_sharing/lib/sharedstorage.php +++ b/apps/files_sharing/lib/sharedstorage.php @@ -401,15 +401,25 @@ class Shared extends \OC\Files\Storage\Common { return $this->filemtime($path) > $time; } - public function getCache() { + public function getCache($path = '') { return new \OC\Files\Cache\Shared_Cache($this); } - public function getPermissionsCache() { + public function getScanner($path = '') { + if ($path != '' && ($source = $this->getSourcePath($path))) { + list($storage, $internalPath) = \OC\Files\Filesystem::resolvePath($source); + if ($storage) { + return $storage->getScanner($internalPath); + } + } + return new \OC\Files\Cache\Scanner($this); + } + + public function getPermissionsCache($path = '') { return new \OC\Files\Cache\Shared_Permissions($this); } - public function getWatcher() { + public function getWatcher($path = '') { return new \OC\Files\Cache\Shared_Watcher($this); } |