fix: 补充代码依赖 (#3544)

This commit is contained in:
ssongliu 2024-01-09 17:21:33 +08:00 committed by GitHub
parent 625189ce85
commit 4f482ad891
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,6 +2,14 @@ package service
import (
"fmt"
"math"
"os"
"path"
"regexp"
"strconv"
"strings"
"time"
"github.com/1Panel-dev/1Panel/backend/app/dto"
"github.com/1Panel-dev/1Panel/backend/app/dto/request"
"github.com/1Panel-dev/1Panel/backend/app/dto/response"
@ -9,12 +17,6 @@ import (
"github.com/1Panel-dev/1Panel/backend/constant"
"github.com/1Panel-dev/1Panel/backend/utils/files"
"github.com/shirou/gopsutil/v3/disk"
"os"
"path"
"regexp"
"strconv"
"strings"
"time"
)
type RecycleBinService struct {
@ -193,8 +195,6 @@ func getRecycleBinDTOFromName(filename string) (*response.RecycleBinDTO, error)
if err != nil {
return nil, err
}
// 添加安全检查确保转换后的值在int类型的范围内
if size < math.MinInt || size > math.MaxInt {
return nil, fmt.Errorf("size out of int range")
}