Skip to content

Commit

Permalink
only read permissions once
Browse files Browse the repository at this point in the history
  • Loading branch information
icewind1991 committed Feb 11, 2015
1 parent 9bbfead commit 9df18ff
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/private/files/cache/scanner.php
Expand Up @@ -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;
Expand All @@ -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;
}

Expand Down

0 comments on commit 9df18ff

Please sign in to comment.