$appFolder) { $appFolders[$key] = rtrim($appFolder['path'], '/'); } $excludedFolders = [ rtrim($root . '/data', '/'), rtrim($root . '/themes', '/'), rtrim($root . '/config', '/'), rtrim($root . '/apps', '/'), rtrim($root . '/assets', '/'), rtrim($root . '/lost+found', '/'), // Ignore folders generated by updater since the updater is replaced // after the integrity check is run. // See https://github.com/owncloud/updater/issues/318#issuecomment-212497846 rtrim($root . '/updater', '/'), rtrim($root . '/_oc_upgrade', '/'), ]; $customDataDir = \OC::$server->getConfig()->getSystemValueString('datadirectory', ''); if ($customDataDir !== '') { $excludedFolders[] = rtrim($customDataDir, '/'); } $this->excludedFolders = array_merge($excludedFolders, $appFolders); } public function accept(): bool { return !\in_array( $this->current()->getPathName(), $this->excludedFolders, true ); } }