We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 66bad8b commit 58d4d90Copy full SHA for 58d4d90
cmd/minify/main.go
@@ -624,11 +624,7 @@ func minifyWorker(chanTasks <-chan Task, chanFails chan<- int) {
624
// compilePattern returns *regexp.Regexp or glob.Glob
625
func compilePattern(pattern string) (*regexp.Regexp, error) {
626
if len(pattern) == 0 || pattern[0] != '~' {
627
- sep := string(filepath.Separator)
628
- if sep == `\` {
629
- sep = `\\`
630
- }
631
-
+ sep := regexp.QuoteMeta(string(filepath.Separator))
632
if strings.HasPrefix(pattern, `\~`) {
633
pattern = pattern[1:]
634
}
0 commit comments