MCPcopy Create free account
hub / github.com/cli/cli / Error

Method Error

internal/safepaths/absolute.go:72–81  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

70}
71
72func (e PathTraversalError) Error() string {
73 if e.Base.path == "" {
74 path := filepath.Join(e.Elems...)
75 if len(e.Elems) == 1 {
76 path = e.Elems[0]
77 }
78 return fmt.Sprintf("path %q is not a local child path", path)
79 }
80 return fmt.Sprintf("joining %s and %s would be a traversal", e.Base, filepath.Join(e.Elems...))
81}

Callers

nothing calls this directly

Calls 1

JoinMethod · 0.80

Tested by

no test coverage detected