perf: 优化资源预取

This commit is contained in:
kuaifan
2024-11-17 13:26:53 +08:00
parent 13e58c63f4
commit 694f9a37a5
3 changed files with 128 additions and 31 deletions

View File

@@ -345,7 +345,7 @@ class IndexController extends InvokeController
$lists = Base::recursiveFiles($dirPath, false);
$files = [];
foreach ($lists as $file) {
if (str_ends_with($file, '.yml') || str_ends_with($file, '.yaml') || str_ends_with($file, '.blockmap')) {
if (preg_match('/\.(zip|yml|yaml|blockmap)$/i', $file) || str_ends_with($file, '-win.exe')) {
continue;
}
$fileName = basename($file, $dirPath);