diff options
author | Robin Appelman <robin@icewind.nl> | 2017-02-10 15:29:48 +0100 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2017-02-10 22:36:12 +0100 |
commit | f27113a6ee16aa92c662292b3ad78e105f531945 (patch) | |
tree | e05dcbf60e95791a2c45ce5825d842b2c14396e2 | |
parent | b4ade766656a2032f33d56eb4a0f17bb128af722 (diff) | |
download | nextcloud-server-f27113a6ee16aa92c662292b3ad78e105f531945.tar.gz nextcloud-server-f27113a6ee16aa92c662292b3ad78e105f531945.zip |
also apply permissions mask in getMetaData
Signed-off-by: Robin Appelman <robin@icewind.nl>
-rw-r--r-- | lib/private/Files/Cache/Scanner.php | 2 | ||||
-rw-r--r-- | lib/private/Files/Storage/Wrapper/PermissionsMask.php | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/lib/private/Files/Cache/Scanner.php b/lib/private/Files/Cache/Scanner.php index 8625e4904ca..0ab24de1ebd 100644 --- a/lib/private/Files/Cache/Scanner.php +++ b/lib/private/Files/Cache/Scanner.php @@ -491,7 +491,7 @@ class Scanner extends BasicEmitter implements IScanner { } else { $lastPath = null; while (($path = $this->cache->getIncomplete()) !== false && $path !== $lastPath) { - $this->runBackgroundScanJob(function() use ($path) { + $this->runBackgroundScanJob(function () use ($path) { $this->scan($path, self::SCAN_RECURSIVE_INCOMPLETE, self::REUSE_ETAG | self::REUSE_SIZE); }, $path); // FIXME: this won't proceed with the next item, needs revamping of getIncomplete() diff --git a/lib/private/Files/Storage/Wrapper/PermissionsMask.php b/lib/private/Files/Storage/Wrapper/PermissionsMask.php index 239824b67e2..ab0c30a4736 100644 --- a/lib/private/Files/Storage/Wrapper/PermissionsMask.php +++ b/lib/private/Files/Storage/Wrapper/PermissionsMask.php @@ -138,4 +138,13 @@ class PermissionsMask extends Wrapper { $sourceCache = parent::getCache($path, $storage); return new CachePermissionsMask($sourceCache, $this->mask); } + + public function getMetaData($path) { + $data = parent::getMetaData($path); + + if ($data && isset($data['permissions'])) { + $data['permissions'] = $data['permissions'] & $this->mask; + } + return $data; + } } |