From ae147c76ff00409857dc2bf567895a2ba7b8c952 Mon Sep 17 00:00:00 2001 From: weifs <605403358@qq.com> Date: Tue, 5 Mar 2024 15:22:40 +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 d214d1052..1401577b9 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 preg_match('/^\d+\.\d+\.\d+/', $file) && 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) {