Skip to content

Commit

Permalink
Skip empty strings in containsSubstring function check
Browse files Browse the repository at this point in the history
  • Loading branch information
sammy fischer committed Jan 6, 2025
1 parent 1f8d202 commit d5959b3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"strings"
)

var version = "1.1"
var version = "1.1.1"

func printOverwrite(message string) {
fmt.Printf("\r%s", message)
Expand Down Expand Up @@ -172,6 +172,9 @@ func removeDuplicates(db *sql.DB, seenChecksums map[string]struct{}, directory s

func containsSubstring(path string, exclude []string) bool {
for _, s := range exclude {
if s == "" {
continue
}
if strings.Contains(path, s) {
return true
}
Expand Down

0 comments on commit d5959b3

Please sign in to comment.