Skip to content

Commit

Permalink
worker: DetectData should return an error if the supported detector f…
Browse files Browse the repository at this point in the history
…ailed
  • Loading branch information
Quentin-M authored and jzelinskie committed Feb 24, 2016
1 parent 4478f40 commit 41736e4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions worker/detectors/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,11 @@ func DetectData(path string, format string, toExtract []string, maxFileSize int6

for _, detector := range dataDetectors {
if detector.Supported(path, format) {
if data, err = detector.Detect(layerReader, toExtract, maxFileSize); err == nil {
return data, nil
data, err = detector.Detect(layerReader, toExtract, maxFileSize)
if err != nil {
return nil, err
}
return data, nil
}
}

Expand Down

0 comments on commit 41736e4

Please sign in to comment.