Fix file extension check

This commit is contained in:
Kailash Nadh 2018-11-27 12:14:55 +05:30
parent 5ff0e446ed
commit 8e10bf3b16
1 changed files with 1 additions and 1 deletions

View File

@ -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
}