mirror of
https://github.com/coredns/coredns.git
synced 2026-04-09 21:45:32 -04:00
fix(auto): resolve symlinked directory before walk (#8032)
This commit is contained in:
@@ -56,6 +56,13 @@ func TestSymlinks(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
// Resolve tempdir to handle platforms where temp paths contain symlinks
|
||||
// (e.g., macOS where /var -> /private/var). Walk resolves the directory
|
||||
// via EvalSymlinks, so stored paths use the resolved prefix.
|
||||
tempdir, err = filepath.EvalSymlinks(tempdir)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
ldr := loader{
|
||||
directory: tempdir,
|
||||
|
||||
Reference in New Issue
Block a user