Skip to content

Commit c8e7c90

Browse files
author
yangsen
committed
qdownload: check LocalDownloadConfig can't empty
1 parent 21b99a8 commit c8e7c90

File tree

1 file changed

+4
-0
lines changed
  • iqshell/storage/object/download/operations

1 file changed

+4
-0
lines changed

iqshell/storage/object/download/operations/batch.go

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package operations
22

33
import (
44
"github.com/qiniu/qshell/v2/iqshell"
5+
"github.com/qiniu/qshell/v2/iqshell/common/alert"
56
"github.com/qiniu/qshell/v2/iqshell/common/data"
67
"github.com/qiniu/qshell/v2/iqshell/common/export"
78
"github.com/qiniu/qshell/v2/iqshell/common/flow"
@@ -30,6 +31,9 @@ func (info *BatchDownloadWithConfigInfo) Check() *data.CodeError {
3031
if err := info.Info.Check(); err != nil {
3132
return err
3233
}
34+
if len(info.LocalDownloadConfig) == 0 {
35+
return alert.CannotEmptyError("LocalDownloadConfig", "")
36+
}
3337
return nil
3438
}
3539

0 commit comments

Comments
 (0)