MCPcopy Create free account
hub / github.com/53AI/53AIHub / normalizeSandboxDeliverablePath

Function normalizeSandboxDeliverablePath

api/service/tools/executor.go:835–850  ·  view source on GitHub ↗
(fileName string)

Source from the content-addressed store, hash-verified

833}
834
835func normalizeSandboxDeliverablePath(fileName string) (string, error) {
836 normalized, err := normalizeSandboxRelativePath(fileName)
837 if err != nil {
838 return "", err
839 }
840 if normalized == "" || normalized == "." {
841 return "", fmt.Errorf("missing path argument")
842 }
843 if strings.Contains(normalized, "/") {
844 return normalized, nil
845 }
846 if shouldNormalizeSandboxDeliverablePath(normalized) {
847 return "output/" + filepath.Base(normalized), nil
848 }
849 return normalized, nil
850}
851
852func normalizeSandboxRuntimePath(fileName string) (string, error) {
853 normalized, err := normalizeSandboxRelativePath(fileName)

Callers 2

Calls 3

ErrorfMethod · 0.80

Tested by

no test coverage detected