From 7d5dd6db669ddd99dd7c58a8621f9e0ed3def400 Mon Sep 17 00:00:00 2001 From: Srigovind Nayak Date: Sun, 19 May 2024 23:40:20 +0530 Subject: [PATCH] fix: add string.Lower for insenstive includes and excludes read from file --- cmd/restic/cmd_restore.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cmd/restic/cmd_restore.go b/cmd/restic/cmd_restore.go index f8a62c360..f71133a0a 100644 --- a/cmd/restic/cmd_restore.go +++ b/cmd/restic/cmd_restore.go @@ -201,6 +201,10 @@ func runRestore(ctx context.Context, opts RestoreOptions, gopts GlobalOptions, return err } + for i, str := range patternsFromFile { + patternsFromFile[i] = strings.ToLower(str) + } + iexcludePatternsFromFile := filter.ParsePatterns(patternsFromFile) insensitiveExcludePatterns = append(insensitiveExcludePatterns, iexcludePatternsFromFile...) } @@ -235,6 +239,10 @@ func runRestore(ctx context.Context, opts RestoreOptions, gopts GlobalOptions, return err } + for i, str := range patternsFromFile { + patternsFromFile[i] = strings.ToLower(str) + } + includePatternsFromFile := filter.ParsePatterns(patternsFromFile) includePatterns = append(includePatterns, includePatternsFromFile...) }