diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2017-02-15 20:22:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-15 20:22:08 +0100 |
commit | 17c07e5cafc6d562382217f4d2f67c20be325e4b (patch) | |
tree | bd2717ced511a0a431e01977a424a75888bf8cef /lib | |
parent | f60d95840e77c1945bfa5acc5911ca12ca70ea42 (diff) | |
parent | f27113a6ee16aa92c662292b3ad78e105f531945 (diff) | |
download | nextcloud-server-17c07e5cafc6d562382217f4d2f67c20be325e4b.tar.gz nextcloud-server-17c07e5cafc6d562382217f4d2f67c20be325e4b.zip |
Merge pull request #3447 from nextcloud/getmetadata-permissions-mask
also apply permissions mask in getMetaData
Diffstat (limited to 'lib')
-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 0aaedd6582f..e65c01559f0 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; + } } |