From 5862e4fd3b97ae37b7cb6c4df4b8b652a274b9d0 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 20 Oct 2014 16:53:06 +0200 Subject: [PATCH] only read permissions once --- lib/private/files/cache/scanner.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/private/files/cache/scanner.php b/lib/private/files/cache/scanner.php index 012b0e98be2a..8e6441d5c664 100644 --- a/lib/private/files/cache/scanner.php +++ b/lib/private/files/cache/scanner.php @@ -80,7 +80,8 @@ public function setUseTransactions($useTransactions) { * @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 @@ public function getData($path) { } $data['etag'] = $this->storage->getETag($path); $data['storage_mtime'] = $data['mtime']; - $data['permissions'] = $this->storage->getPermissions($path); + $data['permissions'] = $permissions; return $data; }