From 90177a39bcb7c072d93aa7a9853b94d8f2485d80 Mon Sep 17 00:00:00 2001 From: James Mills <1290234+prologic@users.noreply.github.com> Date: Sun, 20 Aug 2023 01:02:33 +1000 Subject: [PATCH] Fix bug with filepath --- gitea/gitea.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gitea/gitea.go b/gitea/gitea.go index e6cbd8d..23f4540 100644 --- a/gitea/gitea.go +++ b/gitea/gitea.go @@ -79,12 +79,12 @@ func (c *Client) Open(user, path string) (fs.File, error) { } } - res, err := c.getRawFileOrLFS(user, repo, path, defaultPagesRef) + res, err := c.getRawFileOrLFS(user, repo, filepath, defaultPagesRef) if err != nil { return nil, err } - if strings.HasSuffix(path, ".md") { + if strings.HasSuffix(filepath, ".md") { res, err = handleMD(res) if err != nil { return nil, err @@ -93,7 +93,7 @@ func (c *Client) Open(user, path string) (fs.File, error) { return &openFile{ content: res, - name: path, + name: filepath, }, nil }