Answer stability round 8: a mounted data path names a file where it is on disk
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user