1
0
mirror of https://git.sr.ht/~adnano/kiln synced 2024-12-04 19:08:22 +01:00

dir: Don't create unnecessary directories

This commit is contained in:
adnano 2021-05-15 21:23:45 -04:00
parent 13b3d24738
commit 9f0a4d822e

4
dir.go

@ -214,11 +214,7 @@ func (d *Dir) process(cfg *Site, task *Task) error {
// write writes the directory's contents to the provided destination path.
func (d *Dir) write(dstDir string, task *Task) error {
// Create the directory
dirPath := pathpkg.Join(dstDir, d.Path)
if err := os.MkdirAll(dirPath, 0755); err != nil {
return err
}
// Write pages
pages := d.Pages