Skip to content

Commit

Permalink
return corrent path in windows with usiing path lib
Browse files Browse the repository at this point in the history
  • Loading branch information
Monirzadeh committed Jan 26, 2024
1 parent cf7301c commit b67aef4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/http/routes/frontend.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package routes
import (
"embed"
"net/http"
"path/filepath"
"path"

"github.com/gin-contrib/static"
"github.com/gin-gonic/gin"
Expand All @@ -27,7 +27,7 @@ func (fs assetsFS) Exists(prefix string, path string) bool {
}

func (fs assetsFS) Open(name string) (http.File, error) {
f, err := fs.FileSystem.Open(filepath.Join("assets", name))
f, err := fs.FileSystem.Open(path.Join("assets", name))
if err != nil {
logrus.WithError(err).WithField("path", name).Error("requested frontend file not found")
}
Expand Down

0 comments on commit b67aef4

Please sign in to comment.