mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-14 05:52:43 +00:00
Add StatDir and replace com.StatDir (#14099)
* Add StatDir and replace com.StatDir * a nit * Remove wrong file Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
parent
f8fd8996c0
commit
acd5e5a868
6 changed files with 88 additions and 14 deletions
|
@ -21,7 +21,6 @@ import (
|
|||
"code.gitea.io/gitea/modules/util"
|
||||
|
||||
"gitea.com/macaron/macaron"
|
||||
"github.com/unknwon/com"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -83,7 +82,7 @@ func NewTemplateFileSystem() templateFileSystem {
|
|||
log.Warn("Unable to check if templates dir %s is a directory. Error: %v", customDir, err)
|
||||
}
|
||||
if isDir {
|
||||
files, err := com.StatDir(customDir)
|
||||
files, err := util.StatDir(customDir)
|
||||
|
||||
if err != nil {
|
||||
log.Warn("Failed to read %s templates dir. %v", customDir, err)
|
||||
|
@ -179,7 +178,7 @@ func Mailer() (*texttmpl.Template, *template.Template) {
|
|||
log.Warn("Failed to check if custom directory %s is a directory. %v", err)
|
||||
}
|
||||
if isDir {
|
||||
files, err := com.StatDir(customDir)
|
||||
files, err := util.StatDir(customDir)
|
||||
|
||||
if err != nil {
|
||||
log.Warn("Failed to read %s templates dir. %v", customDir, err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue