fix dir count
This commit is contained in:
parent
90e88e43c1
commit
92b0e70e5d
@ -28,9 +28,13 @@ trait TraitCleanerDir
|
|||||||
'..',
|
'..',
|
||||||
'__MACOSX',
|
'__MACOSX',
|
||||||
'.svn',
|
'.svn',
|
||||||
|
'.hg',
|
||||||
|
'.git',
|
||||||
'CVS',
|
'CVS',
|
||||||
|
'.directory',
|
||||||
'.DS_Store',
|
'.DS_Store',
|
||||||
'Thumbs.db',
|
'Thumbs.db',
|
||||||
|
'_disabled',
|
||||||
];
|
];
|
||||||
|
|
||||||
protected static function getDirs(string|array $roots): array
|
protected static function getDirs(string|array $roots): array
|
||||||
@ -43,7 +47,7 @@ trait TraitCleanerDir
|
|||||||
foreach ($roots as $root) {
|
foreach ($roots as $root) {
|
||||||
$dirs = Files::scanDir($root);
|
$dirs = Files::scanDir($root);
|
||||||
foreach ($dirs as $k) {
|
foreach ($dirs as $k) {
|
||||||
if ('.' == $k || '..' == $k || !is_dir($root . DIRECTORY_SEPARATOR . $k)) {
|
if (in_array($k, self::EXCLUDED) || !is_dir($root . DIRECTORY_SEPARATOR . $k)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$rs[$i]['key'] = $k;
|
$rs[$i]['key'] = $k;
|
||||||
|
Loading…
Reference in New Issue
Block a user