]> source.dussan.org Git - nextcloud-server.git/commitdiff
Use the source Scanner for shared storage when the path is specified
authorMichael Gapczynski <mtgap@owncloud.com>
Tue, 1 Jan 2013 19:47:25 +0000 (14:47 -0500)
committerMichael Gapczynski <mtgap@owncloud.com>
Tue, 1 Jan 2013 19:47:25 +0000 (14:47 -0500)
apps/files_sharing/lib/sharedstorage.php

index 8504a2d89446fb8345c23116ebb1a931acca23aa..3a5755c01fc5eef4572ec2d1c0e04fc3b98d89a9 100644 (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);
        }