mirror of
https://git.mills.io/prologic/pages-server.git
synced 2026-05-18 23:03:27 +02:00
Fix bug with filepath
This commit is contained in:
+3
-3
@@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user