tocss: Fix the import resolving from absolute to relative assets paths

Fixes #12137
This commit is contained in:
Bjørn Erik Pedersen
2024-02-24 11:51:16 +01:00
parent b2b7bfdd3a
commit 189b72331e
5 changed files with 44 additions and 6 deletions

View File

@@ -362,7 +362,7 @@ func (d *SourceFilesystem) ReverseLookup(filename string, checkExists bool) ([]h
var cps []hugofs.ComponentPath
hugofs.WalkFilesystems(d.Fs, func(fs afero.Fs) bool {
if rfs, ok := fs.(hugofs.ReverseLookupProvder); ok {
if c, err := rfs.ReverseLookup(filename, checkExists); err == nil {
if c, err := rfs.ReverseLookupComponent(d.Name, filename, checkExists); err == nil {
cps = append(cps, c...)
}
}