mirror of
https://github.com/coredns/coredns.git
synced 2025-11-01 02:33:14 -04:00
Use filepath when manipulating file paths (#2221)
Automatically submitted.
This commit is contained in:
committed by
corbot[bot]
parent
cf04223718
commit
4b1b0ec9e6
@@ -2,7 +2,6 @@ package auto
|
||||
|
||||
import (
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
|
||||
@@ -91,7 +90,7 @@ func (a Auto) Walk() error {
|
||||
// matches matches re to filename, if is is a match, the subexpression will be used to expand
|
||||
// template to an origin. When match is true that origin is returned. Origin is fully qualified.
|
||||
func matches(re *regexp.Regexp, filename, template string) (match bool, origin string) {
|
||||
base := path.Base(filename)
|
||||
base := filepath.Base(filename)
|
||||
|
||||
matches := re.FindStringSubmatchIndex(base)
|
||||
if matches == nil {
|
||||
|
||||
Reference in New Issue
Block a user