Answer architecture round 10: the paired ruling at fb2c809 is better; a mounted module names its manifest from its files' root, and the mount wrapper returns nothing beside an error

This commit is contained in:
2026-10-11 15:10:23 +02:00
committed by Lillem4n
parent f89540e973
commit d157e4526a
4 changed files with 39 additions and 4 deletions
+8 -2
View File
@@ -22,7 +22,10 @@ func (m mounted) Open(name string) (fs.File, error) {
}
if ok {
f, err := m.fsys.Open(".")
return mountRoot{File: f, name: path.Base(name)}, err
if err != nil {
return nil, err
}
return mountRoot{File: f, name: path.Base(name)}, nil
}
if next, ok := m.towards(name); ok {
return &mountDir{name: path.Base(name), next: next}, nil
@@ -70,7 +73,10 @@ type mountRoot struct {
func (r mountRoot) Stat() (fs.FileInfo, error) {
info, err := r.File.Stat()
return renamed{FileInfo: info, name: r.name}, err
if err != nil {
return nil, err
}
return renamed{FileInfo: info, name: r.name}, nil
}
func (r mountRoot) ReadDir(n int) ([]fs.DirEntry, error) {