check pattern errors when 'hiddenfiles' is set
This commit is contained in:
1 parent
72facea2a0
commit
25e487cc51
2 files changed
+12
-6
No files matched your search
@@ -159,12 +159,10 @@ func matchPattern(pattern, name, path string) bool {
|
||||
matchStr = filepath.Join(path, name)
|
||||
}
|
||||
|
||||
isMatch, err := filepath.Match(pattern, matchStr)
|
||||
if err != nil {
|
||||
log.Printf("pattern %s caused error with %s", pattern, matchStr)
|
||||
return false
|
||||
}
|
||||
return isMatch
|
||||
// pattern errors are checked when 'hiddenfiles' option is set
|
||||
matched, _ := filepath.Match(pattern, matchStr)
|
||||
|
||||
return matched
|
||||
}
|
||||
|
||||
func exportFiles(f string, fs []string) {
|
||||
|
||||
Reference in new issue
Block a user