mirror of
https://github.com/coredns/coredns.git
synced 2025-10-28 00:34:24 -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,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 {
|
||||
|
||||
Reference in New Issue
Block a user