fileserver: clarify "root" value error

This commit is contained in:
yusing 2025-02-06 16:53:37 +08:00
parent f5fb4d2a38
commit 97111d9892

View file

@ -40,7 +40,7 @@ func NewFileServer(base *Route) (*FileServer, E.Error) {
s.Root = filepath.Clean(s.Root)
if !path.IsAbs(s.Root) {
return nil, E.Errorf("root must be absolute")
return nil, E.New("`root` must be an absolute path")
}
s.handler = handler(s.Root)