src/server/pkg/hashtree/path.go
func ValidatePath(path string) error {
	path = clean(path)
	match, _ := regexp.MatchString("^[ -~]+$", path)

	if !match {
		return fmt.Errorf("path (%v) invalid: only printable ASCII characters allowed", path)
	}

	if IsGlob(path) {
		return fmt.Errorf("path (%v) invalid: globbing character (%v) not allowed in path", path, globRegex.FindString(path))
	}

	return nil
}
func ValidatePath(path string) error {
	path = clean(path)
	match, _ := regexp.MatchString("^[ -~]+$", path)

	if !match {
		return fmt.Errorf("path (%v) invalid: only printable ASCII characters allowed", path)
	}

	if IsGlob(path) {
		return fmt.Errorf("path (%v) invalid: globbing character (%v) not allowed in path", path, globRegex.FindString(path))
	}

	return nil
}
// ValidatePath checks if a file path is legal