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,7 @@ package dnssec
import (
"fmt"
"path"
"path/filepath"
"strconv"
"strings"
@@ -146,8 +146,8 @@ func keyParse(c *caddy.Controller) ([]*DNSKEY, error) {
if strings.HasSuffix(k, ".private") {
base = k[:len(k)-8]
}
if !path.IsAbs(base) && config.Root != "" {
base = path.Join(config.Root, base)
if !filepath.IsAbs(base) && config.Root != "" {
base = filepath.Join(config.Root, base)
}
k, err := ParseKeyFile(base+".key", base+".private")
if err != nil {