|
|
|
@ -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")
|
|
|
|
|
}
|
|
|
|
|