diff --git a/modules/caddyhttp/fileserver/browsetplcontext.go b/modules/caddyhttp/fileserver/browsetplcontext.go index b9489c6a6..fee5edd4f 100644 --- a/modules/caddyhttp/fileserver/browsetplcontext.go +++ b/modules/caddyhttp/fileserver/browsetplcontext.go @@ -20,7 +20,6 @@ import ( "net/url" "os" "path" - "path/filepath" "slices" "sort" "strconv" @@ -100,7 +99,7 @@ func (fsrv *FileServer) directoryListing(ctx context.Context, fileSystem fs.FS, } if fsrv.Browse.RevealSymlinks { - symLinkTarget, err := filepath.EvalSymlinks(path) + symLinkTarget, err := os.Readlink(path) if err == nil { symlinkPath = symLinkTarget }