summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2014-10-20 16:53:06 +0200
committerRobin Appelman <icewind@owncloud.com>2015-02-11 13:11:31 +0100
commit9df18ffe75589ecf45bf6802dae1024ce3f03785 (patch)
treecae5f7149fceca97d7188021e90c36bab76c7abd /lib
parent9bbfeada6bb99efdd22514b3a9793a723dfa2564 (diff)
downloadnextcloud-server-9df18ffe75589ecf45bf6802dae1024ce3f03785.tar.gz
nextcloud-server-9df18ffe75589ecf45bf6802dae1024ce3f03785.zip
only read permissions once
Diffstat (limited to 'lib')
-rw-r--r--lib/private/files/cache/scanner.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/private/files/cache/scanner.php b/lib/private/files/cache/scanner.php
index 8f38d68d257..d369398af1c 100644
--- a/lib/private/files/cache/scanner.php
+++ b/lib/private/files/cache/scanner.php
@@ -80,7 +80,8 @@ class Scanner extends BasicEmitter {
* @return array an array of metadata of the file
*/
public function getData($path) {
- if (!$this->storage->isReadable($path)) {
+ $permissions = $this->storage->getPermissions($path);
+ if (!$permissions & \OCP\PERMISSION_READ) {
//cant read, nothing we can do
\OCP\Util::writeLog('OC\Files\Cache\Scanner', "!!! Path '$path' is not accessible or present !!!", \OCP\Util::DEBUG);
return null;
@@ -95,7 +96,7 @@ class Scanner extends BasicEmitter {
}
$data['etag'] = $this->storage->getETag($path);
$data['storage_mtime'] = $data['mtime'];
- $data['permissions'] = $this->storage->getPermissions($path);
+ $data['permissions'] = $permissions;
return $data;
}