Skip to content

High performance, self-hosted, newsletter and mailing list manager with a modern dashboard. Single binary app.

Fix file extension check

Kailash Nadh8e10bf3b16f6
diff --git a/subimporter/importer.go b/subimporter/importer.go
index 45fdf001..dbb2d121 100644
--- a/subimporter/importer.go
+++ b/subimporter/importer.go
@@ -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
}