From 93aad3c543828efca2adeb7f96cf50ae29878593 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Fri, 18 Jun 2021 10:27:27 +0200 Subject: Split out the puthe path/filepath functions into common/paths So they can be used from the config package without cyclic troubles. Updates #8654 --- source/fileInfo.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source/fileInfo.go') diff --git a/source/fileInfo.go b/source/fileInfo.go index 9e7e6df53..7b20f5f29 100644 --- a/source/fileInfo.go +++ b/source/fileInfo.go @@ -18,6 +18,8 @@ import ( "strings" "sync" + "github.com/gohugoio/hugo/common/paths" + "github.com/gohugoio/hugo/hugofs/files" "github.com/pkg/errors" @@ -263,7 +265,7 @@ func (sp *SourceSpec) NewFileInfo(fi hugofs.FileMetaInfo) (*FileInfo, error) { } ext := strings.ToLower(strings.TrimPrefix(filepath.Ext(name), ".")) - baseName := helpers.Filename(name) + baseName := paths.Filename(name) if translationBaseName == "" { // This is usually provided by the filesystem. But this FileInfo is also -- cgit v1.2.3