Use the source Scanner for shared storage when the path is specified

This commit is contained in:
Michael Gapczynski 2013-01-01 14:47:25 -05:00
parent fe90130618
commit a1f7c28e28
1 changed files with 13 additions and 3 deletions

View File

@ -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);
}