hakurei/internal/app/path.go
Ophestra a5f0aa3f30
All checks were successful
Test / Create distribution (push) Successful in 33s
Test / Sandbox (push) Successful in 2m4s
Test / Hakurei (push) Successful in 3m2s
Test / Hpkg (push) Successful in 4m3s
Test / Hakurei (race detector) (push) Successful in 5m8s
Test / Sandbox (race detector) (push) Successful in 2m4s
Test / Flake checks (push) Successful in 1m26s
internal/app: declutter and merge small files
This should make internal/app easier to work with for the upcoming params to shim.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-03 16:59:29 +09:00

16 lines
290 B
Go

package app
import (
"path/filepath"
"strings"
)
func deepContainsH(basepath, targpath string) (bool, error) {
const upper = ".." + string(filepath.Separator)
rel, err := filepath.Rel(basepath, targpath)
return err == nil &&
rel != ".." &&
!strings.HasPrefix(rel, upper), err
}