diff --git a/pkg/service/file/file.go b/pkg/service/file/file.go index 239c5a0..050af65 100644 --- a/pkg/service/file/file.go +++ b/pkg/service/file/file.go @@ -107,8 +107,8 @@ func Delete(ctx *gin.Context) { nowYear := time.Now().Year() nowMonth := time.Now().Month() nowYearPath := fmt.Sprintf("/fiee/video/%d", nowYear) - nowMonthPath := fmt.Sprintf("/fiee/video/%d/%d", nowYear, nowMonth) - if path == nowYearPath || path == nowMonthPath || path == "/fiee" || path == "/fiee/video" { + nowMonthPath := fmt.Sprintf("/fiee/video/%d/%d-%d", nowYear, nowYear, nowMonth) + if path == nowYearPath || path == nowMonthPath || path == "/fiee" || path == "/fiee/video" || path == "/fiee/video/old" { service.Error(ctx, errors.New("无法删除该目录")) return }