mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-13 12:02:51 +00:00
perf: 优化发布接口 删除目录的逻辑
This commit is contained in:
parent
c4430e1a6c
commit
494565e131
@ -252,7 +252,7 @@ class IndexController extends InvokeController
|
|||||||
if ($uploadSuccessFileNum >= $fileNum){
|
if ($uploadSuccessFileNum >= $fileNum){
|
||||||
$directoryPath = public_path("uploads/desktop");
|
$directoryPath = public_path("uploads/desktop");
|
||||||
$files = array_filter(scandir($directoryPath), function($file) use($directoryPath) {
|
$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);
|
sort($files);
|
||||||
foreach ($files as $key => $file) {
|
foreach ($files as $key => $file) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user