From 494565e131b332055dfc6e883a3430f2d2bd2eb3 Mon Sep 17 00:00:00 2001 From: weifs <605403358@qq.com> Date: Mon, 4 Mar 2024 09:51:35 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=20=E4=BC=98=E5=8C=96=E5=8F=91=E5=B8=83?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=20=E5=88=A0=E9=99=A4=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E7=9A=84=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/IndexController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/IndexController.php b/app/Http/Controllers/IndexController.php index 560d96df2..d214d1052 100755 --- a/app/Http/Controllers/IndexController.php +++ b/app/Http/Controllers/IndexController.php @@ -252,7 +252,7 @@ class IndexController extends InvokeController if ($uploadSuccessFileNum >= $fileNum){ $directoryPath = public_path("uploads/desktop"); $files = array_filter(scandir($directoryPath), function($file) use($directoryPath) { - return is_dir($directoryPath . '/' . $file) && $file != '.' && $file != '..'; + return preg_match('/^\d+\.\d+\.\d+/', $file) && is_dir($directoryPath . '/' . $file) && $file != '.' && $file != '..'; }); sort($files); foreach ($files as $key => $file) {