mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 09:42:09 -04:00
Exclude custom data directory from integrity checker
We should not scan any custom data directory in the integrity checker as well. Otherwise this would lead to a massive increased update time that may likely exceed the timeout. To test this: 1. Install ownCloud 8.2.2, set as data dir another folder than `data` such as `data-asdf`. Make sure that folder lives in the web root as well. 2. Update that instance to 9.0.0 beta2 => Errors are shown in the code integrity check 3. Apply this patch and trigger the rescan in the admin settings => No errors are shown anymore (can also do a new update with that patch applied) Fixes https://github.com/owncloud/core/issues/22698
This commit is contained in:
parent
5fe5233f41
commit
2d68c1b945
1 changed files with 8 additions and 2 deletions
|
|
@ -32,12 +32,18 @@ class ExcludeFoldersByPathFilterIterator extends \RecursiveFilterIterator {
|
|||
$appFolders[$key] = rtrim($appFolder['path'], '/');
|
||||
}
|
||||
|
||||
$this->excludedFolders = array_merge([
|
||||
$excludedFolders = [
|
||||
rtrim($root . '/data', '/'),
|
||||
rtrim($root .'/themes', '/'),
|
||||
rtrim($root.'/config', '/'),
|
||||
rtrim($root.'/apps', '/'),
|
||||
], $appFolders);
|
||||
];
|
||||
$customDataDir = \OC::$server->getConfig()->getSystemValue('datadirectory', '');
|
||||
if($customDataDir !== '') {
|
||||
$excludedFolders[] = rtrim($customDataDir, '/');
|
||||
}
|
||||
|
||||
$this->excludedFolders = array_merge($excludedFolders, $appFolders);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue