Fix inverted functionality of --case-sensitive flag, but actually apply the change when filtering
This commit is contained in:
parent
271714f1de
commit
974a4c79fc
|
@ -42,7 +42,11 @@ func (filters *filters) apply(fileList []string) []string {
|
||||||
if filters.hasExcludes() {
|
if filters.hasExcludes() {
|
||||||
for _, exclude := range filters.excluded {
|
for _, exclude := range filters.excluded {
|
||||||
result = slices.DeleteFunc(fileList, func(s string) bool {
|
result = slices.DeleteFunc(fileList, func(s string) bool {
|
||||||
|
if CaseSensitive {
|
||||||
|
return strings.Contains(s, exclude)
|
||||||
|
} else {
|
||||||
return strings.Contains(strings.ToLower(s), strings.ToLower(exclude))
|
return strings.Contains(strings.ToLower(s), strings.ToLower(exclude))
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -50,7 +54,11 @@ func (filters *filters) apply(fileList []string) []string {
|
||||||
if filters.hasIncludes() {
|
if filters.hasIncludes() {
|
||||||
for _, include := range filters.included {
|
for _, include := range filters.included {
|
||||||
result = slices.DeleteFunc(fileList, func(s string) bool {
|
result = slices.DeleteFunc(fileList, func(s string) bool {
|
||||||
|
if CaseSensitive {
|
||||||
|
return !strings.Contains(s, include)
|
||||||
|
} else {
|
||||||
return !strings.Contains(strings.ToLower(s), strings.ToLower(include))
|
return !strings.Contains(strings.ToLower(s), strings.ToLower(include))
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
ReleaseVersion string = "0.92.1"
|
ReleaseVersion string = "0.92.2"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
Loading…
Reference in New Issue