summaryrefslogtreecommitdiffhomepage
path: root/source
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2021-06-18 10:27:27 +0200
committerBjørn Erik Pedersen <[email protected]>2021-06-18 10:55:00 +0200
commit93aad3c543828efca2adeb7f96cf50ae29878593 (patch)
tree6a3dd4f6f878f8f36be9cef03a15b78b19d1f3da /source
parent5af045ebab109d3e5501b8b6d9fd448840c96c9a (diff)
downloadhugo-93aad3c543828efca2adeb7f96cf50ae29878593.tar.gz
hugo-93aad3c543828efca2adeb7f96cf50ae29878593.zip
Split out the puthe path/filepath functions into common/paths
So they can be used from the config package without cyclic troubles. Updates #8654
Diffstat (limited to 'source')
-rw-r--r--source/fileInfo.go4
1 files changed, 3 insertions, 1 deletions
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