diff options
author | 2018-10-21 15:59:37 +0200 | |
---|---|---|
committer | 2018-10-21 13:59:37 +0000 | |
commit | 4b1b0ec9e61dcf02dc7a79e504ca3eae4a3b4b53 (patch) | |
tree | 5ccb309de73dcf49cc4370ec3e08a64604b8e347 /plugin/file/setup.go | |
parent | cf0422371825e97608950d015b5f570416444d4f (diff) | |
download | coredns-4b1b0ec9e61dcf02dc7a79e504ca3eae4a3b4b53.tar.gz coredns-4b1b0ec9e61dcf02dc7a79e504ca3eae4a3b4b53.tar.zst coredns-4b1b0ec9e61dcf02dc7a79e504ca3eae4a3b4b53.zip |
Use filepath when manipulating file paths (#2221)
Automatically submitted.
Diffstat (limited to 'plugin/file/setup.go')
-rw-r--r-- | plugin/file/setup.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugin/file/setup.go b/plugin/file/setup.go index 86eef6b96..5c371babc 100644 --- a/plugin/file/setup.go +++ b/plugin/file/setup.go @@ -2,7 +2,7 @@ package file import ( "os" - "path" + "path/filepath" "time" "github.com/coredns/coredns/core/dnsserver" @@ -71,8 +71,8 @@ func fileParse(c *caddy.Controller) (Zones, error) { origins = args } - if !path.IsAbs(fileName) && config.Root != "" { - fileName = path.Join(config.Root, fileName) + if !filepath.IsAbs(fileName) && config.Root != "" { + fileName = filepath.Join(config.Root, fileName) } reader, err := os.Open(fileName) |