From 735b097d54cd723d4c21038044ee735e53f04497 Mon Sep 17 00:00:00 2001 From: tianya Date: Thu, 1 Dec 2022 23:31:23 +0800 Subject: [PATCH] Update api.php --- src/admin/api.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/admin/api.php b/src/admin/api.php index 1254570d..28bbfd5c 100644 --- a/src/admin/api.php +++ b/src/admin/api.php @@ -275,14 +275,14 @@ if ($action === 'is_need_check_code') { $f->filename = preg_replace('/^\/admin/', $curDir, $f->filename); $srcFile = $backupVerPath.$f->filename; $dstFile = str_replace(array("\\", "//"), '/', DEDEROOT.$f->filename); - var_dump_cli('files','srcFile',$srcFile,'dstFile',$dstFile); - // $rs = @copy($srcFile, $dstFile); - // if($rs) { - // unlink($srcFile); - // } + $rs = @copy($srcFile, $dstFile); + if($rs) { + unlink($srcFile); + } } $row[$k]->ispatched = true; SetCache('update', 'vers', $row); + RmRecurse($backupVerPath); echo json_encode(array( "code" => 0, "msg" => "正在应用{$ver->ver}的版本补丁文件",