def strip_extension(name: str) -> str:
    """
    Remove a single extension from a file name, if present.
    """
    last_dot = name.rfind(".")
    if last_dot > -1:
        return name[:last_dot]
    else:
        return name