forked from jason/cpolis
Change filepaths to use filepath.Join() where possible
This commit is contained in:
@@ -58,8 +58,8 @@ func PublishLatestIssue(c *b.Config, db *b.DB, s map[string]*Session) http.Handl
|
||||
return
|
||||
}
|
||||
|
||||
articleAbsName := fmt.Sprint(c.ArticleDir, "/", article.UUID, ".md")
|
||||
if err = os.WriteFile(articleAbsName, content, 0644); err != nil {
|
||||
articlePath := filepath.Join(c.ArticleDir, fmt.Sprint(article.UUID, ".md"))
|
||||
if err = os.WriteFile(articlePath, content, 0644); err != nil {
|
||||
log.Println(err)
|
||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||
return
|
||||
|
Reference in New Issue
Block a user