MCPcopy Create free account
hub / github.com/bodgit/sevenzip / toValidName

Function toValidName

reader.go:657–667  ·  view source on GitHub ↗
(name string)

Source from the content-addressed store, hash-verified

655}
656
657func toValidName(name string) string {
658 name = strings.ReplaceAll(name, `\`, `/`)
659
660 p := strings.TrimPrefix(path.Clean(name), "/")
661
662 for strings.HasPrefix(p, "../") {
663 p = p[len("../"):]
664 }
665
666 return p
667}
668
669//nolint:cyclop,funlen
670func (z *Reader) initFileList() {

Callers 1

initFileListMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…