From c7f7b5e80349916743454f96880f2b16539cc97c Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sun, 1 Nov 2026 00:49:56 +0900 Subject: internal/rosa: do not hard code filename prefix The hardcoded name is not correct for externally registered files. Signed-off-by: Ophestra --- internal/rosa/state.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'internal/rosa/state.go') diff --git a/internal/rosa/state.go b/internal/rosa/state.go index dc1b3109..c236ee6d 100644 --- a/internal/rosa/state.go +++ b/internal/rosa/state.go @@ -1355,13 +1355,15 @@ func (s *S) RegisterAzalea(r io.Reader, name string, b fs.FS) error { // evaluated if it is at the top level and its name has the suffix ".az", or it // is in a top-level directory with the exact file name "package.az". The // backing filesystem is directly exposed to azalea pathnames. -func (s *S) RegisterFS(fsys fs.FS) error { +// +// The prefix string is only used for position information and must use forward +// slashes as its path separator and end with a path separator. +func (s *S) RegisterFS(fsys fs.FS, prefix string) error { dents, err := fs.ReadDir(fsys, ".") if err != nil { return err } - const prefix = "internal/rosa/package/" var r fs.File for _, dent := range dents { if dent.IsDir() { -- cgit v1.3.1