mirror of
https://git.mills.io/prologic/pages-server.git
synced 2026-05-18 15:03:26 +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 {
|
||||
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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user