mirror of https://github.com/Xhofe/alist
fix: error on repeated reading `static` (#5957)
* Update static.go * rm initial value of static --------- Co-authored-by: Andy Hsu <i@nn.ci>pull/5977/head
parent
aef952ae68
commit
c82866975e
|
@ -16,11 +16,11 @@ import (
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
var static fs.FS = public.Public
|
var static fs.FS
|
||||||
|
|
||||||
func initStatic() {
|
func initStatic() {
|
||||||
if conf.Conf.DistDir == "" {
|
if conf.Conf.DistDir == "" {
|
||||||
dist, err := fs.Sub(static, "dist")
|
dist, err := fs.Sub(public.Public, "dist")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
utils.Log.Fatalf("failed to read dist dir")
|
utils.Log.Fatalf("failed to read dist dir")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue