summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib/sharedstorage.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_sharing/lib/sharedstorage.php')
-rw-r--r--apps/files_sharing/lib/sharedstorage.php24
1 files changed, 17 insertions, 7 deletions
diff --git a/apps/files_sharing/lib/sharedstorage.php b/apps/files_sharing/lib/sharedstorage.php
index 59de2dfa4c4..8d5b22dc283 100644
--- a/apps/files_sharing/lib/sharedstorage.php
+++ b/apps/files_sharing/lib/sharedstorage.php
@@ -23,12 +23,13 @@
namespace OC\Files\Storage;
use OC\Files\Filesystem;
+use OCA\Files_Sharing\ISharedStorage;
use OCA\Files_Sharing\SharedMount;
/**
* Convert target path to source path and pass the function call to the correct storage provider
*/
-class Shared extends \OC\Files\Storage\Common {
+class Shared extends \OC\Files\Storage\Common implements ISharedStorage {
private $share; // the shared resource
private $files = array();
@@ -488,16 +489,25 @@ class Shared extends \OC\Files\Storage\Common {
return $this->filemtime($path) > $time;
}
- public function getCache($path = '') {
- return new \OC\Files\Cache\Shared_Cache($this);
+ public function getCache($path = '', $storage = null) {
+ if (!$storage) {
+ $storage = $this;
+ }
+ return new \OC\Files\Cache\Shared_Cache($storage);
}
- public function getScanner($path = '') {
- return new \OC\Files\Cache\Scanner($this);
+ public function getScanner($path = '', $storage = null) {
+ if (!$storage) {
+ $storage = $this;
+ }
+ return new \OC\Files\Cache\Scanner($storage);
}
- public function getWatcher($path = '') {
- return new \OC\Files\Cache\Shared_Watcher($this);
+ public function getWatcher($path = '', $storage = null) {
+ if (!$storage) {
+ $storage = $this;
+ }
+ return new \OC\Files\Cache\Shared_Watcher($storage);
}
public function getOwner($path) {