Answer stability round 8: a mounted data path names a file where it is on disk

This commit is contained in:
2026-10-11 15:10:23 +02:00
committed by Lillem4n
parent ec865cfe53
commit 230faf58a8
+5
View File
@@ -48,10 +48,15 @@ type Category struct {
// ReadRows reads a rows file beside the category.
func (c Category) ReadRows(name string) (string, error) { return c.rows.read(name) }
// labelled is the file p as errors name it: under the source's label, as the labelled tree
// spells it, below any mount.
func (s Source) labelled(p string) string {
if s.label == "" {
return p
}
if m, isMounted := s.fsys.(mounted); isMounted {
p, _ = m.inner(p)
}
return path.Join(s.label, p)
}