worker: DetectData should return an error if the supported detector failed
This commit is contained in:
parent
4478f40ef1
commit
41736e4600
@ -93,9 +93,11 @@ func DetectData(path string, format string, toExtract []string, maxFileSize int6
|
|||||||
|
|
||||||
for _, detector := range dataDetectors {
|
for _, detector := range dataDetectors {
|
||||||
if detector.Supported(path, format) {
|
if detector.Supported(path, format) {
|
||||||
if data, err = detector.Detect(layerReader, toExtract, maxFileSize); err == nil {
|
data, err = detector.Detect(layerReader, toExtract, maxFileSize)
|
||||||
return data, nil
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
}
|
}
|
||||||
|
return data, nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user