vxcontrol/pentagi · error

invalid path component %q

Error message

invalid path component %q

What it means

Error "invalid path component %q" thrown in vxcontrol/pentagi.

Source

Thrown at backend/pkg/resources/resources.go:437

		if err != nil {
			return fmt.Errorf("failed to create zip entry: %w", err)
		}
		f, err := os.Open(entryPath)
		if err != nil {
			return fmt.Errorf("failed to open file: %w", err)
		}
		_, copyErr := io.Copy(zf, f)
		f.Close()
		return copyErr
	})
}

// validatePathComponent rejects empty, dot/dotdot, overly long, or
// character-unsafe path segments.  Mirrors flowfiles.validatePathComponent.
func validatePathComponent(component string) error {
	clean := strings.TrimSpace(component)
	if clean == "" || clean == "." || clean == ".." {
		return fmt.Errorf("invalid path component %q", component)
	}
	if len(clean) > MaxFileNameLength {
		return fmt.Errorf("path component %q exceeds maximum length of %d", component, MaxFileNameLength)
	}
	for _, r := range clean {
		if r < 0x20 || r == 0x7f {
			return fmt.Errorf("path component contains control characters")
		}
		switch r {
		case '/', '\\', ':', '*', '?', '"', '<', '>', '|':
			return fmt.Errorf("path component contains unsupported character %q", r)
		}
	}
	return nil
}

View on GitHub (pinned to ea665308ba)

When it happens

Trigger: Thrown at backend/pkg/resources/resources.go:437 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of vxcontrol/pentagi@ea665308ba (2026-09-01). Data as JSON: /api/errors/4eafee9a3ef42b97. Report an issue: GitHub.