Add iexclude and iinclude options to restore command

This commit is contained in:
Johannes Hertenstein
2018-11-25 13:32:16 +01:00
committed by Alexander Neumann
parent db82e6b80c
commit c13f79da02
2 changed files with 38 additions and 13 deletions
+9
View File
@@ -187,3 +187,12 @@ func List(patterns []string, str string) (matched bool, childMayMatch bool, err
return matched, childMayMatch, nil
}
// InsensitiveList is the same as List but case insensitive.
func InsensitiveList(patterns []string, str string) (matched bool, childMayMatch bool, err error) {
str = strings.ToLower(str)
for index, path := range patterns {
patterns[index] = strings.ToLower(path)
}
return List(patterns, str)
}