summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib
diff options
context:
space:
mode:
authorMichael Gapczynski <mtgap@owncloud.com>2013-01-01 14:47:25 -0500
committerMichael Gapczynski <mtgap@owncloud.com>2013-01-01 14:47:25 -0500
commita1f7c28e28e221a6939a74eb5ae7b43c02a1d8e6 (patch)
treee9bafb610fb8ac7ab589200a3de9689f2c5f03d4 /apps/files_sharing/lib
parentfe90130618e4ce9b1829b4ce8e87311a15f53b83 (diff)
downloadnextcloud-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.php16
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);
}