mirror of
https://github.com/restic/restic.git
synced 2026-07-19 05:34:54 +00:00
Add iexclude option to backup command
This commit is contained in:
committed by
Alexander Neumann
parent
6dc7cca597
commit
db82e6b80c
@@ -88,6 +88,16 @@ func rejectByPattern(patterns []string) RejectByNameFunc {
|
||||
}
|
||||
}
|
||||
|
||||
// Same as `rejectByPattern` but case insensitive.
|
||||
func rejectByInsensitivePattern(patterns []string) RejectByNameFunc {
|
||||
for index, path := range patterns {
|
||||
patterns[index] = strings.ToLower(path)
|
||||
}
|
||||
return func(item string) bool {
|
||||
return rejectByPattern(patterns)(strings.ToLower(item))
|
||||
}
|
||||
}
|
||||
|
||||
// rejectIfPresent returns a RejectByNameFunc which itself returns whether a path
|
||||
// should be excluded. The RejectByNameFunc considers a file to be excluded when
|
||||
// it resides in a directory with an exclusion file, that is specified by
|
||||
|
||||
Reference in New Issue
Block a user