mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-26 22:04:32 +02:00
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:
@@ -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()
|
||||
|
@@ -173,9 +173,7 @@ theme = ["atheme"]
|
||||
filename = filepath.FromSlash(filename)
|
||||
f, err := fs.Open(filename)
|
||||
c.Assert(err, qt.IsNil)
|
||||
name := f.Name()
|
||||
f.Close()
|
||||
c.Assert(name, qt.Equals, filename)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user