Fix bug with filepath
This commit is contained in:
parent
b6add700a3
commit
90177a39bc
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user