mirror of
https://github.com/yusing/godoxy.git
synced 2025-06-01 09:32:35 +02:00
fileserver: clarify "root" value error
This commit is contained in:
parent
f5fb4d2a38
commit
97111d9892
1 changed files with 1 additions and 1 deletions
|
@ -40,7 +40,7 @@ func NewFileServer(base *Route) (*FileServer, E.Error) {
|
||||||
|
|
||||||
s.Root = filepath.Clean(s.Root)
|
s.Root = filepath.Clean(s.Root)
|
||||||
if !path.IsAbs(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)
|
s.handler = handler(s.Root)
|
||||||
|
|
Loading…
Add table
Reference in a new issue