aboutsummaryrefslogtreecommitdiffstats
path: root/lib/files/cache
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-11-18 14:10:28 +0100
committerRobin Appelman <icewind@owncloud.com>2012-11-18 14:10:28 +0100
commit40fae0acbf2e84782c273a82eb10a2ed9fdf8162 (patch)
treee51e0cc1b2d548b42f744ecf9dea2411197f4b2a /lib/files/cache
parenta922eb756eeb5a301772361c22b0d7f40b1f1cb0 (diff)
downloadnextcloud-server-40fae0acbf2e84782c273a82eb10a2ed9fdf8162.tar.gz
nextcloud-server-40fae0acbf2e84782c273a82eb10a2ed9fdf8162.zip
fix outdated permissions cache use in scanner
Diffstat (limited to 'lib/files/cache')
-rw-r--r--lib/files/cache/scanner.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/files/cache/scanner.php b/lib/files/cache/scanner.php
index eb947a2d53e..404029ee2ef 100644
--- a/lib/files/cache/scanner.php
+++ b/lib/files/cache/scanner.php
@@ -19,12 +19,18 @@ class Scanner {
*/
private $cache;
+ /**
+ * @var \OC\Files\Cache\Permissions $permissionsCache
+ */
+ private $permissionsCache;
+
const SCAN_RECURSIVE = true;
const SCAN_SHALLOW = false;
public function __construct(\OC\Files\Storage\Storage $storage) {
$this->storage = $storage;
- $this->cache = new Cache($storage);
+ $this->cache = $storage->getCache();
+ $this->permissionsCache = $storage->getPermissionsCache();
}
/**
@@ -67,7 +73,7 @@ class Scanner {
}
}
$id = $this->cache->put($file, $data);
- Permissions::set($id, \OC_User::getUser(), $data['permissions']);
+ $this->permissionsCache->set($id, \OC_User::getUser(), $data['permissions']);
return $data;
}