diff --git a/lib/private/integritycheck/iterator/excludefoldersbypathfilteriterator.php b/lib/private/integritycheck/iterator/excludefoldersbypathfilteriterator.php index 67bcd423b6..fc261e4bc5 100644 --- a/lib/private/integritycheck/iterator/excludefoldersbypathfilteriterator.php +++ b/lib/private/integritycheck/iterator/excludefoldersbypathfilteriterator.php @@ -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); } /**