Merge pull request #3447 from nextcloud/getmetadata-permissions-mask
also apply permissions mask in getMetaData
This commit is contained in:
commit
17c07e5caf
|
@ -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()
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue