1
0
Fork 0
mirror of https://github.com/restic/restic.git synced 2024-12-24 00:37:28 +00:00

fix: add string.Lower for insenstive includes and excludes read from file

This commit is contained in:
Srigovind Nayak 2024-05-19 23:40:20 +05:30
parent b02117ef0b
commit 7d5dd6db66
No known key found for this signature in database
GPG key ID: 3C4A72A34ABD4C43

View file

@ -201,6 +201,10 @@ func runRestore(ctx context.Context, opts RestoreOptions, gopts GlobalOptions,
return err return err
} }
for i, str := range patternsFromFile {
patternsFromFile[i] = strings.ToLower(str)
}
iexcludePatternsFromFile := filter.ParsePatterns(patternsFromFile) iexcludePatternsFromFile := filter.ParsePatterns(patternsFromFile)
insensitiveExcludePatterns = append(insensitiveExcludePatterns, iexcludePatternsFromFile...) insensitiveExcludePatterns = append(insensitiveExcludePatterns, iexcludePatternsFromFile...)
} }
@ -235,6 +239,10 @@ func runRestore(ctx context.Context, opts RestoreOptions, gopts GlobalOptions,
return err return err
} }
for i, str := range patternsFromFile {
patternsFromFile[i] = strings.ToLower(str)
}
includePatternsFromFile := filter.ParsePatterns(patternsFromFile) includePatternsFromFile := filter.ParsePatterns(patternsFromFile)
includePatterns = append(includePatterns, includePatternsFromFile...) includePatterns = append(includePatterns, includePatternsFromFile...)
} }