container/absolute: wrap safe stdlib functions

These functions do not change the absoluteness of a pathname.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2025-08-10 03:10:13 +09:00
parent 02271583fb
commit 41ac2be965
4 changed files with 64 additions and 12 deletions

View File

@@ -29,7 +29,7 @@ func Exec(ctx context.Context, p string) ([]*Entry, error) {
var toolPath *container.Absolute
if s, err := exec.LookPath(lddName); err != nil {
return nil, err
} else if toolPath, err = container.NewAbsolute(s); err != nil {
} else if toolPath, err = container.NewAbs(s); err != nil {
return nil, err
}