Use filepath when manipulating file paths (#2221)

Automatically submitted.
This commit is contained in:
Manuel Stocker
2018-10-21 15:59:37 +02:00
committed by corbot[bot]
parent cf04223718
commit 4b1b0ec9e6
10 changed files with 32 additions and 33 deletions

View File

@@ -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 {