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 {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
if strings.HasSuffix(path, ".md") {
|
if strings.HasSuffix(filepath, ".md") {
|
||||||
res, err = handleMD(res)
|
res, err = handleMD(res)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@ -93,7 +93,7 @@ func (c *Client) Open(user, path string) (fs.File, error) {
|
|||||||
|
|
||||||
return &openFile{
|
return &openFile{
|
||||||
content: res,
|
content: res,
|
||||||
name: path,
|
name: filepath,
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user