chore: update dfget recursive log (#2459)
Signed-off-by: Jim Ma <majinjing3@gmail.com>
This commit is contained in:
parent
9137707139
commit
bb29a234f4
|
|
@ -356,8 +356,12 @@ func recursiveDownload(ctx context.Context, client dfdaemonclient.V1, cfg *confi
|
|||
continue
|
||||
}
|
||||
|
||||
logger.Infof("download %s to %s", childCfg.URL, childCfg.Output)
|
||||
if !urlEntry.IsDir {
|
||||
if urlEntry.IsDir {
|
||||
logger.Infof("download directory %s to %s", childCfg.URL, childCfg.Output)
|
||||
queue.PushBack(&childCfg)
|
||||
continue
|
||||
}
|
||||
|
||||
if childCfg.RecursiveList {
|
||||
continue
|
||||
}
|
||||
|
|
@ -367,12 +371,10 @@ func recursiveDownload(ctx context.Context, client dfdaemonclient.V1, cfg *confi
|
|||
logger.Errorf("validate failed: %s", err)
|
||||
return err
|
||||
}
|
||||
if err := singleDownload(ctx, client, &childCfg, logger.With("url", childCfg.URL)); err != nil {
|
||||
logger.Infof("download file %s to %s", childCfg.URL, childCfg.Output)
|
||||
if err = singleDownload(ctx, client, &childCfg, logger.With("url", childCfg.URL)); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
queue.PushBack(&childCfg)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
|
|
|
|||
Loading…
Reference in New Issue