Skip to content

Commit

Permalink
workDir now supports symlinks
Browse files Browse the repository at this point in the history
  • Loading branch information
ameshkov committed Jan 25, 2021
1 parent 0647ab4 commit 3b67948
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ and this project adheres to

### Changed

- `workDir` now supports symlinks.
- When `dns.bogus_nxdomain` option is used, the server will now transform
responses if there is at least one bogus address instead of all of them
([#2394]). The new behavior is the same as in `dnsmasq`.
Expand Down
4 changes: 4 additions & 0 deletions internal/home/home.go
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,10 @@ func initWorkingDir(args options) {
} else {
Context.workDir = filepath.Dir(execPath)
}

if workDir, err := filepath.EvalSymlinks(Context.workDir); err == nil {
Context.workDir = workDir
}
}

// configureLogger configures logger level and output
Expand Down

0 comments on commit 3b67948

Please sign in to comment.