Hopefully fix #

This commit is contained in:
Henrique Dias
2016-11-14 20:09:30 +00:00
parent e03fa7eb0c
commit 5cb16ed8ae
6 changed files with 26 additions and 15 deletions

View File

@@ -18,7 +18,7 @@ func ServeListing(w http.ResponseWriter, r *http.Request, c *config.Config, u *c
var err error
// Loads the content of the directory
listing, err := file.GetListing(u, i.VirtualPath, c.AbsoluteURL+r.URL.Path)
listing, err := file.GetListing(u, i.VirtualPath, c.PrefixURL+r.URL.Path)
if err != nil {
return errors.ErrorToHTTPCode(err, true), err
}

View File

@@ -24,8 +24,8 @@ func PreProccessPUT(
i *file.Info,
) (err error) {
var (
data map[string]interface{}
file []byte
data = map[string]interface{}{}
file = []byte{}
kind string
rawBuffer = new(bytes.Buffer)
)
@@ -43,7 +43,7 @@ func PreProccessPUT(
switch kind {
case "frontmatter-only":
if file, err = ParseFrontMatterOnlyFile(data, i.Name()); err != nil {
if file, err = ParseFrontMatterOnlyFile(data, i.FileInfo.Name()); err != nil {
return
}
case "content-only":