Code Duplication    Length = 4-4 lines in 2 locations

lib/private/files/view.php 2 locations

@@ 1219-1222 (lines=4) @@
1216
1217
			if ($data and isset($data['fileid'])) {
1218
				// upgrades from oc6 or lower might not have the permissions set in the file cache
1219
				if ($data['permissions'] === 0) {
1220
					$data['permissions'] = $storage->getPermissions($data['path']);
1221
					$cache->update($data['fileid'], array('permissions' => $data['permissions']));
1222
				}
1223
				if ($includeMountPoints and $data['mimetype'] === 'httpd/unix-directory') {
1224
					//add the sizes of other mount points to the folder
1225
					$extOnly = ($includeMountPoints === 'ext');
@@ 1308-1311 (lines=4) @@
1305
			$contents = $cache->getFolderContentsById($folderId); //TODO: mimetype_filter
1306
1307
			foreach ($contents as $content) {
1308
				if ($content['permissions'] === 0) {
1309
					$content['permissions'] = $storage->getPermissions($content['path']);
1310
					$cache->update($content['fileid'], array('permissions' => $content['permissions']));
1311
				}
1312
				// if sharing was disabled for the user we remove the share permissions
1313
				if (\OCP\Util::isSharingDisabledForUser()) {
1314
					$content['permissions'] = $content['permissions'] & ~\OCP\Constants::PERMISSION_SHARE;