templates.go: Resolve symlinks

This commit is contained in:
Edd Salkield 2022-09-25 14:43:17 +01:00 committed by Adnan Maolood
parent ff4d614e49
commit 4b39c0bfe1

View file

@ -108,7 +108,7 @@ func (t *Templates) Load(dir string, exts []string) error {
if err != nil { if err != nil {
return err return err
} }
if d.Type().IsRegular() { if d.Type().IsRegular() || d.Type()&fs.ModeSymlink != 0 {
if err := t.LoadTemplate(fsys, path); err != nil { if err := t.LoadTemplate(fsys, path); err != nil {
return err return err
} }