Fix module mount in sub folder

This addresses a specific issue, but is a also a major simplification of the filesystem file mounts.

Fixes #6730
This commit is contained in:
Bjørn Erik Pedersen
2020-01-31 17:15:14 +01:00
parent 2997310124
commit 80dd6ddde2
10 changed files with 510 additions and 351 deletions

View File

@@ -258,6 +258,7 @@ func (s SourceFilesystems) MakeStaticPathRelative(filename string) string {
// MakePathRelative creates a relative path from the given filename.
// It will return an empty string if the filename is not a member of this filesystem.
func (d *SourceFilesystem) MakePathRelative(filename string) string {
for _, dir := range d.Dirs {
meta := dir.(hugofs.FileMetaInfo).Meta()
currentPath := meta.Filename()