Browse Source

fix (#51)

Co-authored-by: AlteredCoder <AlteredCoder>
AlteredCoder 5 năm trước cách đây
mục cha
commit
72d1fe4c3b
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  1. 4 0
      pkg/leakybucket/manager.go

+ 4 - 0
pkg/leakybucket/manager.go

@@ -285,6 +285,10 @@ func LoadBucket(g *BucketFactory, dataFolder string) error {
 
 	if len(g.Data) > 0 {
 		for _, data := range g.Data {
+			if data.DestPath == "" {
+				g.logger.Errorf("no dest_file provided for '%s'", g.Name)
+				continue
+			}
 			err = exprhelpers.FileInit(dataFolder, data.DestPath, data.Type)
 			if err != nil {
 				g.logger.Errorf("unable to init data for file '%s': %s", data.DestPath, err.Error())