Skip to content

Commit

Permalink
fix: error on repeated reading static (AlistGo#5957)
Browse files Browse the repository at this point in the history
* Update static.go

* rm initial value of static

---------

Co-authored-by: Andy Hsu <i@nn.ci>
  • Loading branch information
2 people authored and EtherealAO committed Apr 12, 2024
1 parent ba9459d commit 80aede8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/static/static.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ import (
"github.com/gin-gonic/gin"
)

var static fs.FS = public.Public
var static fs.FS

func initStatic() {
if conf.Conf.DistDir == "" {
dist, err := fs.Sub(static, "dist")
dist, err := fs.Sub(public.Public, "dist")
if err != nil {
utils.Log.Fatalf("failed to read dist dir")
}
Expand Down

0 comments on commit 80aede8

Please sign in to comment.