mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2024-11-24 02:59:16 +08:00
fix: 补充代码依赖 (#3544)
This commit is contained in:
parent
625189ce85
commit
4f482ad891
@ -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")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user