From 33344283b8271a2d9ca21addee829bbb8d759b8e Mon Sep 17 00:00:00 2001 From: tuhao Date: Fri, 29 Jan 2021 01:10:40 +0800 Subject: [PATCH] use DirOptions.ShowHidden in DirListRich --- core/router/fs.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/router/fs.go b/core/router/fs.go index 02715af7..1192bb3c 100644 --- a/core/router/fs.go +++ b/core/router/fs.go @@ -661,6 +661,10 @@ func DirListRich(opts ...DirListRichOptions) DirListFunc { } for _, d := range dirs { + if !dirOptions.ShowHidden && IsHidden(d) { + continue + } + name := toBaseName(d.Name()) upath := path.Join(ctx.Request().RequestURI, name)