Skip to content

Commit

Permalink
Fix file extension check
Browse files Browse the repository at this point in the history
  • Loading branch information
knadh committed Nov 27, 2018
1 parent 5ff0e44 commit 8e10bf3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion subimporter/importer.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ func (s *Session) ExtractZIP(srcPath string, maxCSVs int) (string, []string, err
}

// Skip files without the .csv extension.
if !strings.Contains(strings.ToLower(fName), "csv") {
if !strings.HasSuffix(strings.ToLower(fName), ".csv") {
s.log.Printf("skipping non .csv file '%s'", fName)
continue
}
Expand Down

0 comments on commit 8e10bf3

Please sign in to comment.