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
View file

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