def convert_name(board_name):
    """Convert the given board name into a valid filename."""
    if board_name[-2] == "." and board_name[-1] == "p":
        return "boards/" + board_name
    else:
        return "boards/" + board_name + ".p"